Anonymous user
Odd word problem: Difference between revisions
Updated to work with Nim 1.4: replace proc "nothing" with a proc type and a variable declaration to get a closure and to allow side effects.
(→{{header|Quackery}}: removed test for end of string) |
(Updated to work with Nim 1.4: replace proc "nothing" with a proc type and a variable declaration to get a closure and to allow side effects.) |
||
Line 1,708:
=={{header|Nim}}==
{{trans|Python}}
<lang nim>import
var nothing: Proc = proc(): bool {.closure.} = false
proc odd(prev = nothing): bool =
|