genList
lib.lists.genList
Primop
Docs pulled from | This Revision | 8 minutes ago
Takes 2 arguments
generator, length
Generate list of size length, with each element i equal to the
value returned by generator i
. For example,
builtins.genList (x: x * x) 5
returns the list [ 0 1 4 9 16 ]
.
Noogle detected
Detected Type
genList :: (Int -> a) -> Int -> [a]
Implementation
This function is implemented in c++ and is part of the native nix runtime.