javaabend concepts functional programming€¦ · 8 history • 193x lambda • 1958 lisp • 197x...
TRANSCRIPT
![Page 1: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/1.jpg)
Concepts ofFunctional Programming
Peter Kofler, ‘Code Cop’
JavaAbend, October 2010
![Page 2: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/2.jpg)
3
UML OOA OOP SOAP
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
... for Java Brain(dead)s
![Page 3: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/3.jpg)
4
![Page 4: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/4.jpg)
5
Peter Kofler
• dev since 11 years
• “fanatic about
code quality”
• “Code Cop”
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 5: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/5.jpg)
6
OtherWorlds
![Page 6: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/6.jpg)
7
![Page 7: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/7.jpg)
8
History
• 193x Lambda
• 1958 LISP
• 197x Scheme
• 198x Haskell
• 199x CommonLisp
• 200x Clojure
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 8: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/8.jpg)
9
Ideas…
![Page 9: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/9.jpg)
10
evaluation ofmathematicalfunctions
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 10: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/10.jpg)
11
![Page 11: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/11.jpg)
12
def f(x) x+2 end
def f(x:Int) = x+2
public int f(int x) {
return x+2;
}
<code>
</code>
![Page 12: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/12.jpg)
13
LambdaCalculus
![Page 13: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/13.jpg)
14
λx. x+2
f(x) := x+2
<math>
</math>
![Page 14: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/14.jpg)
15
Definition f(x)
λx. x + 2
application f(3)
(λx. x + 2) 3
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 15: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/15.jpg)
16
NoSide
Effects!
![Page 16: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/16.jpg)
17
Pure
![Page 17: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/17.jpg)
18Transparency
Referential
![Page 18: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/18.jpg)
19
no side effectspure
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 19: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/19.jpg)
20
ImmutableData
![Page 20: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/20.jpg)
21
final is the newprivate
(Joshua Bloch, Effective Java)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 21: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/21.jpg)
22State
![Page 22: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/22.jpg)
23
avoidsstate and
mutable data
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 23: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/23.jpg)
24
![Page 24: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/24.jpg)
25
n! := n*(n-1)!
0! := 1
f(n) := n*f(n-1)
f(0) := 1
<math>
</math>
![Page 25: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/25.jpg)
26
def fact(n:Int):Int =
if (n==0) 1 else
n * fact(n-1)
<scala>
</scala>
![Page 26: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/26.jpg)
27
HigherOrder
![Page 27: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/27.jpg)
28
f(x)
�
f’(x)
xdx
<math>
</math>
![Page 28: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/28.jpg)
29
AnonymousFunctions
![Page 29: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/29.jpg)
30
array = [3, 5, 7, 9]
array.find do |v|
v*v > 30
end
<ruby>
</ruby>
![Page 30: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/30.jpg)
31Closures
![Page 31: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/31.jpg)
32
function derivative(f, dx) {
return function(x) {
return (f(x+dx)-f(x))/dx;
};
}
<javascript>
</javascript>
![Page 32: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/32.jpg)
33
first-class &anonymousfunctions
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 33: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/33.jpg)
34Currying
![Page 34: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/34.jpg)
35
f(x,y) := x+y �
def f(x:Int,y:Int) = x+y
f1(x) returns f2(y) �
def f1(x:Int) = (i:Int) => x+i
def f2(y) = xnow constant+y
<scala>
</scala>
![Page 35: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/35.jpg)
36
“normal”
λx y. x + y
curried
λx. λy. x + y
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 36: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/36.jpg)
37
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Evaluation
lazy
strict
![Page 37: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/37.jpg)
38
� Error � “2”
<code>
</code>
length([2+1,1/0])
![Page 38: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/38.jpg)
39
everything isa function
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 39: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/39.jpg)
40
def mywhile(cond: =>Boolean)
(body: =>Unit) {
if (cond) {
body; mywhile(cond)(body)
}
}
... mywhile( i > 0 ) { i -= 1 }
<scala>
</scala>
![Page 40: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/40.jpg)
41
The almighty
by Jonas Bonér
![Page 41: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/41.jpg)
42
Iterating(foreach/each)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 42: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/42.jpg)
43
Folding (foldLeft/inject)
Reducing (reduceLeft)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 43: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/43.jpg)
44
</scala>
<scala>
def factorial(n:Int) =
((1 to n) :\ 1) ( _*_ )
![Page 44: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/44.jpg)
45
Mapping (map/collect)
Binding (flatMap)
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 45: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/45.jpg)
46
</ruby>
<ruby>
a = [ "a", "b", "c"]
a.collect { |x| x+"!" }
=> # ["a!", "b!", "c!"]
![Page 46: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/46.jpg)
47
</scala>
<scala>
def list(folder:File) = {
folder.listFiles.
filter(_.isDirectory).
flatMap(list (_)) ++
folder.listFiles.
filter(_.isFile)
}
![Page 47: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/47.jpg)
48
InfiniteLists
![Page 48: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/48.jpg)
49
Continuations
![Page 49: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/49.jpg)
50
(* (+ 1 2) 3)
=
(+ 1 2)with continuation
(* [] 3)
<scheme>
</scheme>
![Page 50: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/50.jpg)
51
def loop(interrupt) for i in 1..10 puts "Value of i: #{i}” if i == interrupt callcc {|c| return c} end endend
<ruby>
</ruby by Bruce Tate>
![Page 51: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/51.jpg)
52
irb(main):007> cont = loop 5Value of i: 1...Value of i: 5=> #<Continuation:0x2b5a358>irb(main):008> cont.callValue of i: 6...Value of i: 10
<ruby>
</ruby by Bruce Tate>
![Page 52: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/52.jpg)
53Uhhh ?!
![Page 53: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/53.jpg)
54
![Page 54: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/54.jpg)
55
Monads
![Page 55: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/55.jpg)
56
Skipped...
• Monads
• Category Theory
• Pattern Matching
• Algebraic Data Types
• Type Inference
• Hindley Miller
• ...
![Page 56: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/56.jpg)
57
ThankYou
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 57: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/57.jpg)
58
Acknowledgements
• This presentation was supported bySystem One (as Research Day)(http://www.systemone.net/en/) ... 20%
• This presentation was supported by sITSolutions (for Developer Round Table)(http://www.s-itsolutions.at/) ... 50%
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 58: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/58.jpg)
59
www.code-cop.org
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 59: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/59.jpg)
60
Links
• http://alan.dipert.org/post/307586762/polyglot-folding-ruby-clojure-scala
• http://blog.tmorris.net/what-does-functional-programming-mean/
• http://blogs.tedneward.com/2010/03/23/How+To+And+Not+To+Give+A+Talk+On+F.aspx
• http://deadprogrammersociety.blogspot.com/2007/02/ruby-blocks-closures-and-continuations.html
• http://en.wikipedia.org/wiki/Functional_programming
• http://stackoverflow.com/questions/1112773/what-are-the-core-concepts-in-functional-programming
• http://www.defmacro.org/ramblings/fp.html
• http://www.ibm.com/developerworks/java/library/j-cb03216/ (Continuations)
• http://www.infoq.com/presentations/Functional-Languages-101
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 60: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/60.jpg)
61
CC Images #1
• zombie: http://www.flickr.com/photos/vincetemplement/3333125657/
• spray face: http://www.flickr.com/photos/iangallagher/4115047191/
• other worlds: http://www.flickr.com/photos/tohoscope/43818252/
• new ideas: http://www.flickr.com/photos/jpovey/2051196149/
• history: http://www.flickr.com/photos/shadowgate/2679760160/
• functions: http://www.flickr.com/photos/stefz/2159280574/
• lambda: http://www.flickr.com/photos/itsgreg/419031515/
• effects: http://www.flickr.com/photos/delgrossodotcom/3094902951/
• pure: http://www.flickr.com/photos/10451396@N00/429388973/
• dices: http://www.flickr.com/photos/dicemanic/19743895/
• lock: http://www.flickr.com/photos/bpc009/3328427457/
• states: http://www.flickr.com/photos/krazydad/2986774792/
• recursion: http://www.flickr.com/photos/torley/2361164281/
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 61: JavaAbend Concepts Functional Programming€¦ · 8 History • 193x Lambda • 1958 LISP • 197x Scheme • 198x Haskell • 199x Common Lisp • 200x Clojure PETER KOFLER, CODE-COP.ORG](https://reader034.vdocument.in/reader034/viewer/2022050413/5f899cd064769342cf1749cf/html5/thumbnails/61.jpg)
62
CC Images #2
• higher: http://www.flickr.com/photos/brent_nashville/2204427649/
• unknown: http://www.flickr.com/photos/laughingsquid/2443128847/
• closed: http://www.flickr.com/photos/functoruser/244208110/
• currying: http://www.flickr.com/photos/dumbeast/315869395/
• strict: http://www.flickr.com/photos/williac/99551756/
• lazy: http://www.flickr.com/photos/ucumari/2813269535/
• möbius: http://www.flickr.com/photos/serafa/2590342868/
• uhh: http://www.flickr.com/photos/jswaby/1178547691/
• seaside: http://www.flickr.com/photos/rgtmum/2280206308/
• skyscraper: http://www.flickr.com/photos/sanbeiji/81110217/
• monads: http://www.flickr.com/photos/adamrice/3266888223/
• questions: http://www.flickr.com/photos/seandreilinger/2326448445/
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY