map! evaluates twice
Salih Dincer
salihdb at hotmail.com
Thu Jun 16 07:58:24 UTC 2022
On Friday, 10 June 2022 at 22:10:10 UTC, Ali Çehreli wrote:
> [...] I am trying to finish a .cached range algorithm that
> caches all elements that are in use. (It must drop old elements
> so that an infinite range does not require infinite cache.)
>
> It is supposed to evaluate elements only once.
I guess the developed cached() and cache() are different things,
right? I tried cached(), it works fine and cleverly designed...
SDB at 79
More information about the Digitalmars-d-learn
mailing list