* Function concatMap as in Haskell.

svn path=/nixpkgs/trunk/; revision=10501
This commit is contained in:
Eelco Dolstra 2008-02-05 11:41:09 +00:00
parent c583b8389b
commit 937f8663ac

View file

@ -52,6 +52,10 @@ rec {
fold (x: y: x + y) "";
# Map and concatenate the result.
concatMap = f: list: concatLists (map f list);
# Place an element between each element of a list, e.g.,
# `intersperse "," ["a" "b" "c"]' returns ["a" "," "b" "," "c"].
intersperse = separator: list: