> By the way: does anybody know wether there's a name for
> this construction with methods that take a function as an
> argument?
They're called Higher-Order Functions, see
http://c2.com/cgi/wiki?HigherOrderFunction for a summary. The "usual" HOF's for collection processing (i.e. map, fold/reduce and filter) can do most of the common tasks people use explicits loops to, usually with shorter/clearer code.
BTW here's a comparison of different syntaxes (assuming a succ function/method):
Ruby
"HAL".collect() {|x| x.succ()}
Smalltalk
"HAL" collect: [:x| x succ]
Lisp
(mapcar #'succ "HAL")
Haskell
map succ "HAL"
You can see the code getting terser while the redundant information is filtered down. Both Ruby and Smalltalk treat blocks and methods differently, so we need to put a block around a method name. Haskell and Lisp expect functions and they treat anonymous functions (i.e. blocks in Ruby) as named functions, so no problems here.
A nice thing about this transparency (regarding functions) is that you can combine them without much though (Haskell-like syntax):
multipliers = map (*) [1..10]
products n = map (\f -> f n) multipliers
So we can define a list of functions that take a value and return it multiplied by some factor (1 to 10 in this case) and use it find all multiples (up to 10) of some number n. This example is simple but sometimes is very handy to have a list of things to do and be able to process them with some parameter (like copying some data to multiple destinations).