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

Tony tonytdominguez at aol.com
Tue Dec 26 10:53:10 UTC 2023


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

and then tried to print out the type of arr4:

writefln("%s",typeof(arr4));

and got this error:

// HelloWorld.d:25:19: error: cannot pass type 
SortedRange!(Result, "a < b") as a function argument

What exactly is that type? Or maybe, what would it take to 
understand what that type is?



More information about the Digitalmars-d-learn mailing list