nixos/tests: add predictable-interface-names.nix (#34305)

This commit is contained in:
symphorien
2018-02-09 18:40:39 +00:00
committed by Franz Pletz
parent a51cda85ff
commit 0146074560
4 changed files with 35 additions and 2 deletions

View File

@@ -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];