Anonymous user
Loops/Do-while: Difference between revisions
→{{header|Ela}}
(Add XPL0) |
|||
Line 235:
<lang ela>open console
This implementation uses a thunk to represent a console output. Output is not done in the initialization of 'out' variable, it is done when 'out' calculation is forced by a '
▲loop n | n % 6 == 0 = out $ ()
▲ | else = out $ loop (n+1)
▲ where out = (& writen n)</lang>
▲This implementation uses a thunk to represent a console output. Output is not done in the initialization of 'out' variable, it is done when 'out' calculation is forced by a '$' operator (sequencing operator).
=={{header|Erlang}}==
|