query
On this page

cartesianProductOfSets

lib.attrsets.cartesianProductOfSets

Docs pulled from | This Revision | 35 minutes ago


Return the cartesian product of attribute set value combinations.

Inputs

attrsOfLists

Attribute set with attributes that are lists of values

Type

cartesianProduct :: AttrSet -> [AttrSet]

Examples

lib.attrsets.cartesianProduct usage example

cartesianProduct { a = [ 1 2 ]; b = [ 10 20 ]; }
=> [
     { a = 1; b = 10; }
     { a = 1; b = 20; }
     { a = 2; b = 10; }
     { a = 2; b = 20; }
   ]
(lib.attrsets.cartesianProduct)

Noogle also knows

Aliases