2022-11-19 16:14:18 +01:00
|
|
|
{ stdlib }:
|
2022-03-07 16:01:52 +01:00
|
|
|
let
|
2022-11-19 16:14:18 +01:00
|
|
|
inherit (stdlib.trivial) const;
|
|
|
|
inherit (stdlib.lists) range any all;
|
|
|
|
in {
|
2022-03-07 16:01:52 +01:00
|
|
|
# a -> Int -> [a]
|
|
|
|
repeat = item: times: map (const item) (range 1 times);
|
|
|
|
|
|
|
|
# [Bool] -> Bool
|
|
|
|
any' = any (boolean: boolean);
|
|
|
|
|
|
|
|
# [Bool] -> Bool
|
|
|
|
all' = all (boolean: boolean);
|
|
|
|
}
|