Frameworks and libraries
Vladimir Panteleev
thecybershadow.lists at gmail.com
Sat Sep 16 05:32:19 UTC 2023
On Friday, 15 September 2023 at 20:38:12 UTC, Atila Neves wrote:
> std.string, I get, but algorithm and range are poster children
> for `@nogc`. I'm not going to claim that *nothing* in those
> packages allocates on the GC heap, but I'd be very surprised if
> there were many functions that did.
It's not possible to `map` a range and add a variable to every
element.
Functor predicates are the solution:
https://github.com/CyberShadow/ae/blob/bb876371c963130dd94a0f44a9a5a2561ff053b4/utils/functor/algorithm.d#L23-L69
More information about the Digitalmars-d
mailing list