Loops/While: Difference between revisions

Line 151:
 
=={{header|Clojure}}==
<lang lisp>(whiledef (> @i 0(ref 1024))
 
(println @i)
(while (> @i 0)
(dosync (ref-set i (quot @i 2))))</lang>
(println @i)
(dosync (ref-set i (quot @i 2))))</lang>
 
 
(loop [i 1024]
(when (pos? i)
(println @i)
(recur (quot i 2))))
 
 
(doseq [i (take-while pos? (iterate #(quot % 2) 1024))]
(println i))</lang>
 
=={{header|ColdFusion}}==
Remove the leading space from the line break tag.
Anonymous user