Open gelisam opened 11 years ago
Swap can be written as:
> printf "1\t2" | hsl swap
or equivalently
> printf "1\t2" | hsl '\(x,y) -> (y,x)'
With implicit arguments, we should be allowed to write it as:
> printf "1\t2" | hsl '(_2, _1)'
I think it would also be useful to support _0 for the entire argument, for those cases where pointfree style is inconvenient:
_0
> seq 10 | hsl 'take 2 _0 ++ drop (length _0 - 2) _0' 1 2 9 10
Swap can be written as:
or equivalently
With implicit arguments, we should be allowed to write it as:
I think it would also be useful to support
_0
for the entire argument, for those cases where pointfree style is inconvenient: