Fibonacci n-step number sequences: Difference between revisions

Several modifications to make the program compile with Nim version 1.4.
(Added Wren)
(Several modifications to make the program compile with Nim version 1.4.)
Line 2,718:
else:
var ans = 0
for i in n-start.len .. < n:
ans += fibber(i)
memo.add ans
Line 2,735:
se.add(1 shl i)
let fibber = fiblike(se)
echo "n = ", align($n, 2), ", ", align(name, 5), "nacci -> ", toSeq(0..14).mapIt($fibber(it)).join(" "), " ..."</lang>
", toSeq(0..14).mapIt(string, $fibber(it)).join(" "), " ..."</lang>
Output:
<pre>@[1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
Anonymous user