On Tuesday, 26 December 2023 at 13:58:54 UTC, tony wrote:
On Tuesday, 26 December 2023 at 11:19:29 UTC, Sergey wrote:
Use typeid, instead of typeof
Thanks!
Got quite a type but I will worry about that later:
std.range.SortedRange!(Result, "a < b").SortedRange
Yes, because sort is returning special type, compatible with
Ranges interface.
You can add 'sort(...).array' and the type will become 'int[]'
(or which types arrays were before).
Ranges are specific things for D (one of the core feature of the
lang and std), which can evaluated lazily. You can check some
description how they are working in the documentation
https://dlang.org/phobos/std_range.html