Ary Borenszweig:

10.table!({ return letters.choice; }).writeln;

Couldn't map! be used with a delegate that doesn't receive any arguments?

I think map() requires a callable that receives one argument.

table() doesn't need the iota() as map(), it accepts one or more numerical arguments, so it's able to generate 2D arrays, 3D arrays, etc.:

table!(() => letters.choice)(3, 4, 5).writeln;

Bye,
bearophile

Reply via email to