change • An identity is a stable logical entity associated with a series of different values over time • A state is the value of an identity at a point in time
as they are held in contempt by all, no Verb is ever permitted to wander about freely. If a Verb is to be seen in public at all, it must be escorted at all times by a Noun.” ! — Steve Yegge
[a] -> b foldl f z [] = z foldl f z (x:xs) = foldl f (f z x) xs ! sum :: [Int] -> Int sum = foldl (+) 0 ! prod :: [Int] -> Int prod = foldl (*) 1 High-order functions
f [] = [] filter f (x:xs) | f x = x : filter f xs | otherwise = filter f xs ! ! filterEven = filter (\x -> x `mod` 2 == 0) filterAlpha = filter isAlpha High-order functions