"Adam Spitz" <adamspitz / bigfoot.com> wrote in message
news:87f44f44.0111300746.2da9943c / posting.google.com...

> arrayOfFive = Array.curry(:new, 5)
> p arrayOfFive.call("A")   # => ["A", "A", "A", "A", "A"]
>
>
> Is this the kind of thing you were looking for?

Yes, that is truly powerful.
And a very good example of extending classes after they have been created.

However, all the suggestions on solving this problem shows how amazingly
flexible Ruby is.


Mikkel