Executable library: Difference between revisions

Nimrod -> Nim
m (→‎{{header|REXX}}: removed STYLE from the PRE html tags.)
(Nimrod -> Nim)
Line 742:
The length of hailstone sequence that is most common in the range 1 <= N < 100000 is 72. It occurs 1467 times.</pre>
 
=={{header|NimrodNim}}==
<lang nimrodnim>proc hailstone*(n): auto =
result = @[n]
var n = n
Line 764:
echo "Maximum length ", m, " was found for hailstone(", mi, ") for numbers <100,000"</lang>
 
In NimrodNim the value <code>isMainModule</code> is set at compiletime, and we can use it with <code>when</code> (a compiletime if).
 
'''Library Importing Example'''
<lang nimrodnim>import hailstone, tables
 
var t = initCountTable[int]()
Anonymous user