3 ms·
I don't get it, why do I need the pipe operator for this? #(9 1 2 3 7 5 5 8 4) unique sorted -> ( 1,2,3,4,5,7,8,9) In Objective-Smalltalk (http://objec
by mpweiher 12y ago
I don't get it, why do I need the pipe operator for this?
#(9 1 2 3 7 5 5 8 4) unique sorted
-> ( 1,2,3,4,5,7,8,9)
In Objective-Smalltalk (http://objective.st http://objective.st).
Definitions:
-unique
{
(NSOrderedSet orderedSetWithArray:self) array.
}
-sort
{
self sortedArrayUsingSelector:'compare:'.
}
Why is it suddenly cool to make things so much more complicated than they need to be?