On 8.5.2015 8:19, Rustom Mody wrote:
On Wed, May 6, 2015 at 6:45 PM, Ivan Levkivskyi <firstname.lastname@example.org
def sunique(lst): return sorted(list(set(lst))) vs. sunique = sorted @ list @ set
I would like to suggest that if composition is in fact added to python its order is 'corrected' ie in math there are two alternative definitions of composition
 f o g = λ x • g(f(x))  f o g = λ x • f(g(x))
 is more common but  is also used
And IMHO  is much better for left-to-right reading so your example becomes sunique = set @ list @ sorted which reads as smoothly as a classic Unix pipeline:
"Unnamed parameter input to set; output inputted to list; output inputted to sort"
While both versions make sense,  is the one that resembles the chaining of linear operators or matrices, since column vectors are the convention. For the left-to-right pipeline version, some other operator might be more appropriate. Also, it would then be more clear to also feed x into the pipeline from the left, instead of putting (x) on the right like in a normal function call.
As a random example, (root @ mean @ square)(x) would produce the right order for rms when using .