mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
843 B
843 B
synopsis | prs | |
---|---|---|
Add `pipe-operators` experimental feature |
|
This is a draft implementation of RFC 0148.
The pipe-operators
experimental feature adds <|
and |>
operators to the Nix language.
a |>
b is equivalent to the function application b a, and
a <|
b is equivalent to the function application a b.
For example:
nix-repl> 1 |> builtins.add 2 |> builtins.mul 3
9
nix-repl> builtins.add 1 <| builtins.mul 2 <| 3
7
<|
and |>
are right and left associative, respectively, and have lower precedence than any other operator.
These properties may change in future releases.
See the RFC for more examples and rationale.