Anonymous user
Man or boy test: Difference between revisions
Replaced "future" which is deprecated in Nim 1.4 by "sugar". Added a general comment and the result for k = 10.
(Replaced "future" which is deprecated in Nim 1.4 by "sugar". Added a general comment and the result for k = 10.) |
|||
Line 2,251:
=={{header|Nim}}==
With standard compilation values, it is possible to run the program with <code>k = 10</code>. With <code>k = 11</code>, we reach the default call depth limit (2000). In this case, compiling with option <code>-d:nimCallDepthLimit=2100</code> is enough to get the result: -138.
<lang nim>import
proc a(k: int; x1, x2, x3, x4, x5: proc(): int): int =
Line 2,262 ⟶ 2,263:
echo a(10, () => 1, () => -1, () => -1, () => 1, () => 0)</lang>
{{out}}
<pre>-67</pre>
=={{header|Objeck}}==
|