A few quick, minor examples
map f [] = []
map f (x::xs) = f x : map f xs
<<fn>> :: (a->b) -> [a] -> [b]
lst = map square [3,4,5]
[9,16,25] :: [Int]
(3,4,\x y -> x+y)
(3,4,<<fn>>) : (Int,Int,Int->Int->Int)
Previous slide
Next slide
Back to first slide
View graphic version