@@ -170,8 +170,9 @@ not.
170 partition (\x -> x < 3) [0..5] == ([0,1,2], [3,4,5])
170 partition (\x -> x < 3) [0..5] == ([0,1,2], [3,4,5])
171 partition isEven [0..5] == ([0,2,4], [1,3,5])
171 partition isEven [0..5] == ([0,2,4], [1,3,5])
173partition : (a -> Bool) -> [a] -> ([a],[a])
174partition : (a -> Bool) -> [a] -> ([a],[a])
174−partition pred lst =
175+partition pred lst =
175 case lst of
176 case lst of
176 [] -> ([],[])
177 [] -> ([],[])
177 x::xs -> let (bs,cs) = partition pred xs in
178 x::xs -> let (bs,cs) = partition pred xs in
@@ -194,7 +195,10 @@ If one list is longer, the extra elements are dropped.
194zipWith : (a -> b -> c) -> [a] -> [b] -> [c]
195zipWith : (a -> b -> c) -> [a] -> [b] -> [c]
195zipWith = Native.List.zipWith
196zipWith = Native.List.zipWith
197−{-| Decompose a list of tuples. -}
198+{-| Decompose a list of tuples.
199+ unzip [(0, True), (17, False), (1337, True)] == ([0,17,1337], [True,False,True])
198unzip : [(a,b)] -> ([a],[b])
202unzip : [(a,b)] -> ([a],[b])
199unzip pairs =
203unzip pairs =
200 case pairs of
204 case pairs of
@@ -213,6 +217,7 @@ join = Native.List.join
214 intersperse "on" ["turtles","turtles","turtles"] == ["turtles","on","turtles","on","turtles"]
218 intersperse "on" ["turtles","turtles","turtles"] == ["turtles","on","turtles","on","turtles"]
216intersperse : a -> [a] -> [a]
221intersperse : a -> [a] -> [a]
217intersperse sep xs =
222intersperse sep xs =
218 case xs of
223 case xs of