mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
* 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) "";
|
||||
|
||||
|
||||
# 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:
|
||||
|
Loading…
Reference in New Issue
Block a user