Jump to content

Accumulator factory: Difference between revisions

m
(Replace existing solution by a more general one and add a solution using a customized number type.)
Line 2,128:
We provide the code for the two last solutions.
 
==={{ Fixed accumulator type}} ===
<lang Nim>
proc accumulator[T: SomeNumber](x: T): auto =
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.