Stair-climbing puzzle: Difference between revisions
Content added Content deleted
(→{{header|J}}: use and explain 0:) |
(→{{header|J}}: shorten explicit) |
||
Line 172: | Line 172: | ||
'''Solution (Explicit):''' |
'''Solution (Explicit):''' |
||
<lang j>step_upX=: monad define |
<lang j>step_upX=: monad define |
||
while. -. +/y do. y=. y , _1 1 {~ step 0 end. |
|||
ClimbAttempts=. y |
|||
while. -. +/ClimbAttempts do. |
|||
ClimbAttempts=. ClimbAttempts , <:`>:@.step #'' |
|||
end. |
|||
)</lang> |
)</lang> |
||