diff options
author | lassulus <lassulus@lassul.us> | 2021-03-07 23:22:35 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-03-07 23:22:35 +0100 |
commit | b81eb46c7d6439af7b7cedff9d4f81714f235d15 (patch) | |
tree | e62bdd6e86008f8b888a87d8337750e33a46f033 /lib | |
parent | 6fee4ac9fef8200624e62f5e339abfae860ff497 (diff) | |
parent | a9b82ce4124cb3a3f2e6ee8b087c0d8461bad386 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix index 2efeec078..4190f8f5f 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -15,6 +15,10 @@ let uri = import ./uri.nix { inherit lib; }; xml = import ./xml.nix { inherit lib; }; + # compose a list of functions to be applied from left to right, i.e. + # compose :: [ (xm -> xn) ... (x1 -> x2) (x0 -> x1) ] -> x0 -> xn + compose = foldl' (f: g: x: f (g x)) id; + eq = x: y: x == y; ne = x: y: x != y; mod = x: y: x - y * (x / y); |