Unverified Commit 581adae8 authored by Silvan Mosberger's avatar Silvan Mosberger Committed by GitHub
Browse files

Merge pull request #273467 from adisbladis/lib-pipe-no-let

lib.pipe: Avoid creating a scope
parents e8637912 c8c2ae63
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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