diff options
author | symphorien <symphorien@users.noreply.github.com> | 2018-02-09 18:40:39 +0000 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2018-02-09 18:40:39 +0000 |
commit | 01460745602c2c31f2ce6d7a22ff80602894679b (patch) | |
tree | 47a09f5c8fa604e93e29720ecbb96ecea734d753 /lib/lists.nix | |
parent | a51cda85ff30876b71fee87b1eef4409af6d4277 (diff) | |
download | nixlib-01460745602c2c31f2ce6d7a22ff80602894679b.tar nixlib-01460745602c2c31f2ce6d7a22ff80602894679b.tar.gz nixlib-01460745602c2c31f2ce6d7a22ff80602894679b.tar.bz2 nixlib-01460745602c2c31f2ce6d7a22ff80602894679b.tar.lz nixlib-01460745602c2c31f2ce6d7a22ff80602894679b.tar.xz nixlib-01460745602c2c31f2ce6d7a22ff80602894679b.tar.zst nixlib-01460745602c2c31f2ce6d7a22ff80602894679b.zip |
nixos/tests: add predictable-interface-names.nix (#34305)
Diffstat (limited to 'lib/lists.nix')
-rw-r--r-- | lib/lists.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/lists.nix b/lib/lists.nix index 8f67c6bb0ca3..f2e6bacdc98b 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -440,8 +440,12 @@ rec { init = list: assert list != []; take (length list - 1) list; - /* FIXME(zimbatm) Not used anywhere - */ + /* return the image of the cross product of some lists by a function + + Example: + crossLists (x:y: "${toString x}${toString y}") [[1 2] [3 4]] + => [ "13" "14" "23" "24" ] + */ crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f]; |