lib: move lib extensions into its own module argument
This commit is contained in:
14
lib/lists.nix
Normal file
14
lib/lists.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ stdlib }:
|
||||
let
|
||||
inherit (stdlib.trivial) const;
|
||||
inherit (stdlib.lists) range any all;
|
||||
in {
|
||||
# a -> Int -> [a]
|
||||
repeat = item: times: map (const item) (range 1 times);
|
||||
|
||||
# [Bool] -> Bool
|
||||
any' = any (boolean: boolean);
|
||||
|
||||
# [Bool] -> Bool
|
||||
all' = all (boolean: boolean);
|
||||
}
|
||||
Reference in New Issue
Block a user