1 == Working with lists ==
\r
5 Note that some of these functions work also for other
\r
6 data structures than lists.
\r
12 map f l = [f x | x <- l]
\r
13 filter p l = [x | x <- l, p x]
\r
14 sum l = [y | x <- l, y <- x]
\r
16 concatMap f l = [y | x <- l, y <- f x]
\r
17 zip l m = [(x,y) | x <- l | y <- m]
\r
18 zipWith f l m = [f x y | x <- l | y <- m]
\r