about summary refs log tree commit diff
path: root/lib/trivial.nix
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2023-12-11 16:21:46 +1300
committeradisbladis <adisbladis@gmail.com>2023-12-11 16:25:21 +1300
commitc8c2ae638aa2e723a2b3517c4390d3c46d671ee8 (patch)
tree74c135837a661b203334c2d48d9e32eb9d257fcc /lib/trivial.nix
parenteec92ca9df6ac423377275170caf58878076f798 (diff)
lib.pipe: Avoid creating scopes
Diffstat (limited to 'lib/trivial.nix')
-rw-r--r--lib/trivial.nix4
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