Accumulator factory: Difference between revisions

Added comment.
(Reintroduced solution with float accumulator.)
(Added comment.)
Line 2,130:
 
=== Using float accumulator ===
Argument to the factory function may be any signed integer, unsigned integer or float.
Argument to the created accumulator function must be float.
Result is always float.
<lang Nim>
proc accumulator[T: SomeNumber](x: T): auto =
Anonymous user