diff options
author | makefu <github@syntax-fehler.de> | 2021-03-19 09:17:48 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2021-03-19 09:17:48 +0100 |
commit | 8c28e9f4170d05e3e9dfb89985ce4f352cd91245 (patch) | |
tree | 82407d4e8454b3abfbb8288f8bc6765c64bf036b /lib/default.nix | |
parent | 758660945c712b645e755e9101a9fd3d8a325c91 (diff) | |
parent | 3bbbc82ae9ab9f0ac737b2ff0b55b50ae9c77b8a (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lib/default.nix')
-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); |