hi lukas I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though. Lukas On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
Ahh, it is called #reduce:, #reduceLeft: and #reduceRight: in Pharo. Lukas On 21 July 2010 18:27, Lukas Renggli <renggli@gmail.com> wrote:
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though.
Lukas
On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
Now I remember: We called it #reduce: because this is much more common among programming languages. The implementation in Pharo is much more general than the one of Squeak. Pharo behaves the same as Squeak for two argument blocks on SequenceableCollection. Squeak does not support anything else. Lukas On 21 July 2010 18:32, Lukas Renggli <renggli@gmail.com> wrote:
Ahh, it is called #reduce:, #reduceLeft: and #reduceRight: in Pharo.
Lukas
On 21 July 2010 18:27, Lukas Renggli <renggli@gmail.com> wrote:
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though.
Lukas
On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
On Jul 21, 2010, at 6:35 PM, Lukas Renggli wrote:
Now I remember: We called it #reduce: because this is much more common among programming languages.
I could not put a name on it too :)
The implementation in Pharo is much more general than the one of Squeak. Pharo behaves the same as Squeak for two argument blocks on SequenceableCollection. Squeak does not support anything else.
Lukas
On 21 July 2010 18:32, Lukas Renggli <renggli@gmail.com> wrote:
Ahh, it is called #reduce:, #reduceLeft: and #reduceRight: in Pharo.
Lukas
On 21 July 2010 18:27, Lukas Renggli <renggli@gmail.com> wrote:
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though.
Lukas
On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Wed, 21 Jul 2010, Lukas Renggli wrote:
Now I remember: We called it #reduce: because this is much more common among programming languages.
Really? http://en.wikipedia.org/wiki/Fold_(higher-order_function) Levente
The implementation in Pharo is much more general than the one of Squeak. Pharo behaves the same as Squeak for two argument blocks on SequenceableCollection. Squeak does not support anything else.
Lukas
On 21 July 2010 18:32, Lukas Renggli <renggli@gmail.com> wrote:
Ahh, it is called #reduce:, #reduceLeft: and #reduceRight: in Pharo.
Lukas
On 21 July 2010 18:27, Lukas Renggli <renggli@gmail.com> wrote:
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though.
Lukas
On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
We will not argue on that one! Stef On Jul 21, 2010, at 6:55 PM, Levente Uzonyi wrote:
On Wed, 21 Jul 2010, Lukas Renggli wrote:
Now I remember: We called it #reduce: because this is much more common among programming languages.
Really? http://en.wikipedia.org/wiki/Fold_(higher-order_function)
Levente
The implementation in Pharo is much more general than the one of Squeak. Pharo behaves the same as Squeak for two argument blocks on SequenceableCollection. Squeak does not support anything else.
Lukas
On 21 July 2010 18:32, Lukas Renggli <renggli@gmail.com> wrote:
Ahh, it is called #reduce:, #reduceLeft: and #reduceRight: in Pharo.
Lukas
On 21 July 2010 18:27, Lukas Renggli <renggli@gmail.com> wrote:
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though.
Lukas
On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Now I remember: We called it #reduce: because this is much more common among programming languages.
Really? http://en.wikipedia.org/wiki/Fold_(higher-order_function)
Yes, reduce is typically used without initial value, while fold is used with initial value (we already have inject:into: for that). Lukas
Levente
The implementation in Pharo is much more general than the one of Squeak. Pharo behaves the same as Squeak for two argument blocks on SequenceableCollection. Squeak does not support anything else.
Lukas
On 21 July 2010 18:32, Lukas Renggli <renggli@gmail.com> wrote:
Ahh, it is called #reduce:, #reduceLeft: and #reduceRight: in Pharo.
Lukas
On 21 July 2010 18:27, Lukas Renggli <renggli@gmail.com> wrote:
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though.
Lukas
On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
I like this point so we can include fold: then. Stef On Jul 21, 2010, at 7:15 PM, Lukas Renggli wrote:
Now I remember: We called it #reduce: because this is much more common among programming languages.
Really? http://en.wikipedia.org/wiki/Fold_(higher-order_function)
Yes, reduce is typically used without initial value, while fold is used with initial value (we already have inject:into: for that).
Lukas
Levente
The implementation in Pharo is much more general than the one of Squeak. Pharo behaves the same as Squeak for two argument blocks on SequenceableCollection. Squeak does not support anything else.
Lukas
On 21 July 2010 18:32, Lukas Renggli <renggli@gmail.com> wrote:
Ahh, it is called #reduce:, #reduceLeft: and #reduceRight: in Pharo.
Lukas
On 21 July 2010 18:27, Lukas Renggli <renggli@gmail.com> wrote:
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though.
Lukas
On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 21.07.2010, at 18:27, Lukas Renggli wrote:
See <http://code.google.com/p/pharo/issues/detail?id=2401>. Looks like it never got merged though.
The test case for it is a really really nice one. Remembers what is different in smalltalk and smalltalk developers: array := Array with: Color red with: Color green with: Color blue. self assert: (array reduce:[:a :b| a + b]) = Color white. I like this so much. thanks, Norbert
Lukas
On 21 July 2010 18:20, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
hi lukas
I thought that we introduced the equivalent when we were pair programming at my place. fold: got introduced in squeak and may be your implementation/API should be pushed there? Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (4)
-
Levente Uzonyi -
Lukas Renggli -
Norbert Hartl -
Stéphane Ducasse