First class environments: Difference between revisions

m
→‎{{header|REXX}}: simplified the HAILSTONE function.
m (→‎{{header|REXX}}: added/changed comments and whitespace, changed indentations, used output templates, reduced font size for 2nd output, simplified code.)
m (→‎{{header|REXX}}: simplified the HAILSTONE function.)
Line 1,355:
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
hailstone: procedure expose @.; parse arg y; _=word(@.y, words(@.y) )
if _==1 then return ''; @.0=0; if _//2==0 then return _%2*3+1; return _*3+1%2</lang>
{{out|output|text=&nbsp; when using the default input:}}
<pre>