* Function concatMap as in Haskell.

svn path=/nixpkgs/branches/stdenv-updates/; revision=10588
This commit is contained in:
Yury G. Kudryashov 2008-02-10 17:38:56 +00:00
parent 7753a1c5e9
commit e7bc12a932

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: