Using reduce() with tuples created by zip()
Philippe Sigaud
philippe.sigaud at gmail.com
Fri Nov 1 13:08:01 PDT 2013
What I'm trying to explain is that reduce takes two arguments: the growing
value and the current front. In your case, the current front is indeed a
2-tuple, but that's an unrelated issue.
You're trying to get:
reduce!( (firstElemOfPair, secondElemOfPair) => ...) (range)
to work, whereas reduce signature is:
reduce!( (onGoingValue, elem) => ...) (range)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20131101/420dda38/attachment.html>
More information about the Digitalmars-d-learn
mailing list