42 |> $+1 # 43
The $ is a placeholder for the value in the previous pipeline step, like (.) in magrittr.
There's a ton more you can do thanks to macro expansion capabilities added by pipescript. Here's 5 factorial:
range(1, 6) |> reduce[$$] # 120
Placeholders can also be given informative names unlike in magrittr:
range(1, 6) |> reduce[$accum
$current] # 120The lack of names placeholders in magrittr had been my biggest complaint. Anyway I had a lot of fun scratching this itch and am really proud of the result, hope you like it too. :)
smacke•1d ago
Should be `reduce[$*$]`