each & opApply

Alex sascha.orlov at gmail.com
Wed May 23 13:59:30 UTC 2018

On Wednesday, 23 May 2018 at 13:49:45 UTC, Steven Schveighoffer 
> Right, but not foreach(el1, el2; c), which is the equivalent of 
> your each call.
Yes. I tried this in the first place and get a compiler error. 
But it seemed logical to me, that if I define two opApply 
overloads, which both matches two arguments, then I need to 
specify which one I want to use. I achieved this by specifying 
the types inside the foreach... concisely enough for me :)

So... I'm looking how to do the same with ´each´, as defining the 
type of the lambda didn't help.

More information about the Digitalmars-d-learn mailing list