From 01460745602c2c31f2ce6d7a22ff80602894679b Mon Sep 17 00:00:00 2001 From: symphorien Date: Fri, 9 Feb 2018 18:40:39 +0000 Subject: nixos/tests: add predictable-interface-names.nix (#34305) --- lib/lists.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/lists.nix') 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]; -- cgit v1.2.3