Jump to content

Stair-climbing puzzle: Difference between revisions

Added Easylang
(Realize in F#)
(Added Easylang)
 
Line 513:
return loop(1)
}</syntaxhighlight>
 
=={{header|EasyLang}}==
<syntaxhighlight>
func step .
if randint 2 = 2
print "climbed up"
return 1
else
print "fell down"
return 0
.
.
proc step_up . .
while step = 0
step_up
.
.
step_up
</syntaxhighlight>
{{out}}
<pre>
fell down
fell down
fell down
climbed up
climbed up
fell down
climbed up
climbed up
fell down
climbed up
climbed up
</pre>
 
=={{header|EchoLisp}}==
2,078

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.