Solve hanging lantern problem: Difference between revisions

Content added Content deleted
m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 1,424: Line 1,424:
{{trans|Python}}
{{trans|Python}}
The result for n == 5 is slow to emerge.
The result for n == 5 is slow to emerge.
<syntaxhighlight lang="ecmascript">var lantern // recursive function
<syntaxhighlight lang="wren">var lantern // recursive function
lantern = Fn.new { |n, a|
lantern = Fn.new { |n, a|
var count = 0
var count = 0
Line 1,459: Line 1,459:
{{libheader|Wren-big}}
{{libheader|Wren-big}}
Alternatively, using library methods.
Alternatively, using library methods.
<syntaxhighlight lang="ecmascript">import "./perm" for Perm
<syntaxhighlight lang="wren">import "./perm" for Perm
import "./big" for BigInt
import "./big" for BigInt