Kind of a clunky and verbose syntax at the moment. I wonder what languages get pipe syntax right?
Obligatory: Raku supports pipe in both directions, passing input as the last parameter instead of requiring the function to take only one parameter. It also has a shorthand:
my @array = <7 8 9 0 1 2 4 3 5 6 7 8 9>;
my @final-array = @array.unique.sort.reverse;
say @final-array;
There is a complementary Partial Function Application RFC which, among other things, solves the one-parameter limitation. It allows a question mark to be substituted in for the piped value:
Obligatory: Raku supports pipe in both directions, passing input as the last parameter instead of requiring the function to take only one parameter. It also has a shorthand:
my @array = <7 8 9 0 1 2 4 3 5 6 7 8 9>; my @final-array = @array.unique.sort.reverse; say @final-array;