Bug 13107 – std.range.table

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-12T11:58:57Z
Last change time
2024-12-01T16:21:53Z
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: phobos#10073 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10073 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB