Jump to content

Stair-climbing puzzle: Difference between revisions

m
→‎{{header|Standard ML}}: add alternate SML version and fix syntax highlighting
m (→‎{{header|Wren}}: Minor tidy)
m (→‎{{header|Standard ML}}: add alternate SML version and fix syntax highlighting)
Line 1,479:
 
=={{header|Standard ML}}==
 
<syntaxhighlight lang="standard mlsml">
(*
* val step : unit -> bool
Line 1,490 ⟶ 1,491:
*)
fun step_up() = step() orelse (step_up() andalso step_up())
</syntaxhighlight>
 
Alternate version:
<syntaxhighlight lang="sml">fun step() = true
 
fun step_up() = while step() = false do step_up()
</syntaxhighlight>
 
23

edits

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