On 4/20/22 19:11, Alain De Vos wrote: > Maybe there are multiple solutions ?
Indeed. :) I have a Range struct here: http://ddili.org/ders/d.en/ranges.html#ix_ranges.infinite%20range Another one with fibers here: http://ddili.org/ders/d.en/fibers.html The same chapter uses Generator: http://ddili.org/ders/d.en/fibers.html#ix_fibers.Generator,%20std.concurrency And Phobos has an example here: https://dlang.org/library/std/range/recurrence.html Ali