Rust-like collect in D
    Meta via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Wed Oct 12 19:33:11 PDT 2016
    
    
  
On Thursday, 13 October 2016 at 01:15:22 UTC, Andrei Alexandrescu 
wrote:
> On 10/06/2016 10:32 AM, Nordlöw wrote:
>> Is there a concept in D similar to Rust's `collect`:
>>
>> https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect
>
> That's "make" in std.container. Is that what you're looking 
> for? As an aside, "collect" is an awful abbreviation of 
> "collection". -- Andrei
I've always thought of it more as "collect the elements of the 
iterator into a container".
    
    
More information about the Digitalmars-d-learn
mailing list