Comment #0 by bearophile_hugs — 2014-07-12T11:58:57Z
I suggest to add to Phobos a function like this:
table!func(optional_arguments)
It generates an infinite range of calls the function func. So this code:
table!uniform(0.0, 2.0)
Is similar to:
0.repeat.map!(_ => uniform(0.0, 2.0))
So to generate 100 random uniform values in [0.0, 1.0[:
table!uniform01.take(100)
It is related to this Mathematica function, but the syntax is different and it's lazy and infinite:
http://reference.wolfram.com/language/ref/Table.html
Comment #1 by robert.schadek — 2024-12-01T16:21:53Z