Re: dlang.org/Learn "hello_world".sort.chain ...

2024-05-05 Thread Marko Merpovich via Digitalmars-d-learn
On Tuesday, 26 December 2023 at 10:53:10 UTC, Tony wrote: I just typed in the program that is on the first page of Learn. It has this line: sort(chain(arr1, arr2, arr3)); I assigned that to a variable: arr4 = sort(chain(arr1, arr2, arr3)); then printed it out writefln("%s",arr4); // works

Re: dlang.org/Learn "hello_world".sort.chain ...

2023-12-26 Thread Sergey via Digitalmars-d-learn
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 returnin

Re: dlang.org/Learn "hello_world".sort.chain ...

2023-12-26 Thread tony via Digitalmars-d-learn
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

Re: dlang.org/Learn "hello_world".sort.chain ...

2023-12-26 Thread Sergey via Digitalmars-d-learn
On Tuesday, 26 December 2023 at 10:53:10 UTC, Tony wrote: I just typed in the program that is on the first page of Learn. It has this line: sort(chain(arr1, arr2, arr3)); I assigned that to a variable: arr4 = sort(chain(arr1, arr2, arr3)); then printed it out writefln("%s",arr4); // works