5 ms·
Yes, or if you don't want to use a template function, for whatever reason, you can wrap the result of iota(1000) into an InputRangeObject (see https://dlang.org
by EvenThisAcronym 7y ago
Yes, or if you don't want to use a template function, for whatever reason, you can wrap the result of iota(1000) into an InputRangeObject (see https://dlang.org/phobos/std_range_interfaces.html#InputRange https://dlang.org/phobos/std_range_interfaces.html#InputRang... for an example).
> I don't like how the conditions are detached from type definitions
I can understand that; it's something that takes a bit of getting used to. See https://dlang.org/concepts.html https://dlang.org/concepts.html for an explanation of template constraints and why they were designed this way.