Lazy caching map()?
Graham Fawcett
fawcett at uwindsor.ca
Mon Mar 19 16:47:16 UTC 2018
On Friday, 9 March 2018 at 19:41:46 UTC, H. S. Teoh wrote:
> Today I found myself needing a lazy, caching version of map()
> on an array. More precisely, given an array `T[] src` of
> source data and a function func(T) that's pretty expensive to
> compute, return an object `result` such that:
>
> [...]
Map the sources to std.parallelism.Task instances, and
yieldForce() the instances when you need the results?
Graham
More information about the Digitalmars-d
mailing list