1 / 21

HASKELL LANGUAGE REPORT

HASKELL LANGUAGE REPORT. Brett Nelson. John von Neumann. PAUL BERNAYS. ALAN TURING. ALONZO CHURCH. HASKELL CURRY. WHAT DO YOU NOTICE?. Lambda Calculus. Stephen Kleene Alonza Church. Lambda  Fryer Function.  x.fried-x If we applied chicken to the fryer function like this:

jarah
Télécharger la présentation

HASKELL LANGUAGE REPORT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HASKELL LANGUAGE REPORT Brett Nelson

  2. John von Neumann

  3. PAUL BERNAYS

  4. ALAN TURING

  5. ALONZO CHURCH

  6. HASKELL CURRY

  7. WHAT DO YOU NOTICE?

  8. Lambda Calculus • Stephen Kleene • Alonza Church

  9. Lambda  Fryer Function x.fried-x If we applied chicken to the fryer function like this: x.fried-x chicken => fried-chicken

  10. Church Integers 0 = λf.λx.x 1 = λf.λx.f(x) 2 = λf.λx.f(f(x)) 3 = λf.λx.f(f(f(x))) 4 = λf.λx.f(f(f(f(x))))

  11. Successor Function SUCC = λs.λw.λt.w(s w t)

  12. Successor Function SUCC = λs.λw.λt.w(s w t) λs.λw.λt.w(s w t) (λf.λx.x)

  13. Successor Function SUCC = λs.λw.λt.w(s w t) λs.λw.λt.w(s w t) (λf.λx.x) λw.λt.w((λf.λx.x) w t)

  14. Successor Function SUCC = λs.λw.λt.w(s w t) λs.λw.λt.w(s w t) (λf.λx.x) λw.λt.w((λf.λx.x) w t) w.λt.w((λx.x) t)

  15. Successor Function SUCC = λs.λw.λt.w(s w t) λs.λw.λt.w(s w t) (λf.λx.x) λw.λt.w((λf.λx.x) w t) w.λt.w((λx.x) t) λw.λt.w( t )

  16. Church Integers λw.λt.w( t ) 0 = λf.λx.x 1 = λf.λx.f(x) 2 = λf.λx.f(f(x)) 3 = λf.λx.f(f(f(x))) 4 = λf.λx.f(f(f(f(x))))

  17. Quicksort qsort( a, lo, hi ) int a[], hi, lo; { int h, l, p, t; if (lo < hi) { l = lo; h = hi; p = a[hi]; do { while ((l < h) && (a[l] <= p)) l = l+1; while ((h > l) && (a[h] >= p)) h = h-1; if (l < h) { t = a[l]; a[l] = a[h]; a[h] = t; } } while (l < h); t = a[l]; a[l] = a[hi]; a[hi] = t; qsort( a, lo, l-1 ); qsort( a, l+1, hi ); } }

  18. Quicksort qsort [] = [] qsort (x:xs) = qsort elts_lt_x ++ [x] ++ qsort elts_greq_x where elts_lt_x = [y | y <- xs, y < x] elts_greq_x = [y | y <- xs, y >= x]

  19. Why Haskell? Moore’s Law Physical Limits

  20. Bottlenecks

  21. Conclusion If you want to be part of the future of computer science. Learn Haskell and don’t comb your hair.

More Related