Comment #2 on issue 5134 by
[hidden email]: Comment of
Collection>>#reduce:
http://code.google.com/p/pharo/issues/detail?id=5134Lukas should we keep the implementation? Because I was wondering why we
should convert it in an orderedCollection. Is it used to build foldR and L?
I was reading the comment and I was wondering what is the general use of
reduce:
#(1 2 3 4 5) asSet reduce: [ :a :b :c | a + b + c ]
--> 1 + 2 + 3 + 4 + 5 = 15
What is the use to have a block with 3 parameters?
When I read #(1 2 3 4 5) asSet reduce: [ :a :b :c | a + b + c ]
I thought that it would be 1+2+3, 2+3+4 ....
So reduce: is like inject:into:?
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker