diff options
author | adisbladis <adisbladis@gmail.com> | 2023-12-11 16:21:46 +1300 |
---|---|---|
committer | adisbladis <adisbladis@gmail.com> | 2023-12-11 16:25:21 +1300 |
commit | c8c2ae638aa2e723a2b3517c4390d3c46d671ee8 (patch) | |
tree | 74c135837a661b203334c2d48d9e32eb9d257fcc /lib/trivial.nix | |
parent | eec92ca9df6ac423377275170caf58878076f798 (diff) |
lib.pipe: Avoid creating scopes
Diffstat (limited to 'lib/trivial.nix')
-rw-r--r-- | lib/trivial.nix | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix index caff77190fde2..9b7e4563444fa 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -58,9 +58,7 @@ rec { of the next function, and the last function returns the final value. */ - pipe = val: functions: - let reverseApply = x: f: f x; - in builtins.foldl' reverseApply val functions; + pipe = builtins.foldl' (x: f: f x); # note please don’t add a function like `compose = flip pipe`. # This would confuse users, because the order of the functions |