On Monday, 19 March 2018 at 16:47:16 UTC, Graham Fawcett wrote:
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
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:
[...]
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:
-
On Wed, Mar 14, 2018 at 12:12:44AM +, aliak via Digitalmars-d wrote:
[...]
> Btw, I just saw someone posted a link to an old forum post of yours:
> https://forum.dlang.org/post/mailman.2562.1403196857.2907.digitalmar...@puremagic.com
>
> Mind if I add that (or a version of it) to a library
On Tuesday, 13 March 2018 at 17:24:35 UTC, H. S. Teoh wrote:
Very nice. Using memoize did occur to me, but I needed an array
interface to it. Didn't think of using memoize with map, for
some reason. Thanks for the idea!
However, looking at the implementation of memoize, it seems
that it's
On Sat, Mar 10, 2018 at 08:54:16PM +, aliak via Digitalmars-d wrote:
> On Friday, 9 March 2018 at 19:41:46 UTC, H. S. Teoh wrote:
> > [...] 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
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:
-
On Fri, Mar 09, 2018 at 12:47:14PM -0700, Jonathan M Davis via Digitalmars-d
wrote:
> On Friday, March 09, 2018 11:41:46 H. S. Teoh via Digitalmars-d wrote:
> > [...] More precisely, given an array `T[] src` of source data and a
> > function func(T) that's pretty expensive to compute, return an
On Friday, March 09, 2018 11:41:46 H. S. Teoh via Digitalmars-d 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`
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:
- result[i] == func(src[i]), for 0 ≤ i < src.length.
- If result[j]
10 matches
Mail list logo