diff options
author | Silvan Mosberger <contact@infinisil.com> | 2023-12-11 17:16:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 17:16:05 +0100 |
commit | 581adae822129af2daf9801598cc92d355d9241a (patch) | |
tree | e7e6f2781f2440f7fb552ee23c797bb1af58de24 /lib | |
parent | e8637912a03c03ac48ab4b3479f4dc1895c7a2ec (diff) | |
parent | c8c2ae638aa2e723a2b3517c4390d3c46d671ee8 (diff) |
Merge pull request #273467 from adisbladis/lib-pipe-no-let
lib.pipe: Avoid creating a scope
Diffstat (limited to 'lib')
-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 b3fb54a7add41..463cec351bdf0 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -70,9 +70,7 @@ in { 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 |