* Function concatMap as in Haskell.
svn path=/nixpkgs/branches/stdenv-updates/; revision=10588
This commit is contained in:
parent
7753a1c5e9
commit
e7bc12a932
@ -52,6 +52,10 @@ rec {
|
|||||||
fold (x: y: x + y) "";
|
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.,
|
# Place an element between each element of a list, e.g.,
|
||||||
# `intersperse "," ["a" "b" "c"]' returns ["a" "," "b" "," "c"].
|
# `intersperse "," ["a" "b" "c"]' returns ["a" "," "b" "," "c"].
|
||||||
intersperse = separator: list:
|
intersperse = separator: list:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user