shell-functools
shell-functools copied to clipboard
Support for 'flip'
It would be great if we could apply flip to a function before we hand it over to a command. For example (suppose that % is a flip-operator):
> seq 3 | map %append "-"
-1
-2
-3
> seq 3 | filter %contains "12"
1
2
It would be great if we could apply
flipto a function before we hand it over to a command. For example (suppose that%is aflip-operator):> seq 3 | map %append "-" 1- 2- 3-
With reference to the first example, if I just do seq | map append "-" - whitout flip - this is what I get:
> seq 3 | map append "-"
1-
2-
3-
I Imagine that the expect output when using flip would be:
> seq 3 | map %append "-"
-1
-2
-3
am I interpreting this in the right way?
am I interpreting this in the right way?
Absolutely, thanks. I have adapted my description above.