C++ Ranges proposal for the Standard Library

via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 17 08:14:31 PDT 2014


On Friday, 17 October 2014 at 09:52:26 UTC, Marco Leise wrote:
> True. Iterators are more foundational, ranges are more
> neat-o. ;)

Python is more accurate, succinct and generic :-)

Fraction(Fraction(sum(a)),len(a))

or

Fraction(sum([Fraction(n) for n in a]),len(a))


More information about the Digitalmars-d mailing list