Solve hanging lantern problem: Difference between revisions

Content added Content deleted
Line 58: Line 58:
Of course, for the simple sequences from 1, we can use iota to generate them instead of typing them out:
Of course, for the simple sequences from 1, we can use iota to generate them instead of typing them out:


<pre> lanterns ⍳3 ⍝ same as lanterns 1 2 3
<pre>
60
lanterns ⍳4 ⍝ same as lanterns 1 2 3 4
lanterns ⍳4
12600
12600
lanterns ⍳5
lanterns ⍳5