mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
Merge pull request #273467 from adisbladis/lib-pipe-no-let
lib.pipe: Avoid creating a scope
This commit is contained in:
commit
581adae822
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user