[#1026] Is this a bug? — Dave Thomas <Dave@...>

18 messages 2000/01/03

[#1084] Infinite loop — Dave Thomas <Dave@...>

17 messages 2000/01/11

[#1104] The value of while... — Dave Thomas <Dave@...>

24 messages 2000/01/11

[ruby-talk:01046] Equivalent of 'inject'

From: Dave Thomas <Dave@...>
Date: 2000-01-04 03:06:16 UTC
List: ruby-talk #1046
Now I know I'm being stupid, but I can't see a Ruby equivalent of
operations such as Smalltalk's 'inject'. What's the clean way of (say) 
summing the elements in an array?

Regards

Dave

In This Thread

Prev Next