aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-12-18 14:56:09 +1100
committerJustin Bedo <cu@cua0.org>2018-12-18 14:56:09 +1100
commit4d2b5043f8d7d56aeb94d11218e4ae5cda1662d1 (patch)
tree0a40b5f8473b028759909ba1a316fbc310f79692
parent0418c23f5d3bff108744d96d1075b0e76b580fdd (diff)
pipe: reverse function composition
-rw-r--r--default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 6e07a74..42dd286 100644
--- a/default.nix
+++ b/default.nix
@@ -35,6 +35,7 @@ let
exec = f: x: y: qsub (builtins.intersectAttrs qsubDefs x) (f (builtins.removeAttrs x (builtins.attrNames qsubDefs)) y);
});
def = f: defs: attrs: f (defs // attrs);
+ pipe = let g = fs: with builtins; let h = head fs; t = tail fs; in if t != [] then x: (g t (h x)) else h; in g
# Fetching files of specific type
fetchFastQ = attrs: with types; tagFiletype (filetype.fq {}) (fetchurl attrs);