Re: ElementType of MapResult is a delegate??

2018-12-09 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/8/18 8:19 AM, John Chapman wrote: On Saturday, 8 December 2018 at 13:02:00 UTC, Yuxuan Shui wrote: This surprised me A LOT: https://d.godbolt.org/z/82a_GZ So if I call something.map!().array, I get an array of delegates? That makes no sense to me. But in your example, "(a) =>"

Re: ElementType of MapResult is a delegate??

2018-12-08 Thread John Chapman via Digitalmars-d-learn
On Saturday, 8 December 2018 at 13:02:00 UTC, Yuxuan Shui wrote: This surprised me A LOT: https://d.godbolt.org/z/82a_GZ So if I call something.map!().array, I get an array of delegates? That makes no sense to me. But in your example, "(a) =>" returns "{return tmp;}", which is a delegate.

ElementType of MapResult is a delegate??

2018-12-08 Thread Yuxuan Shui via Digitalmars-d-learn
This surprised me A LOT: https://d.godbolt.org/z/82a_GZ So if I call something.map!().array, I get an array of delegates? That makes no sense to me.