Loops/While: Difference between revisions

no edit summary
(added Morfa)
No edit summary
Line 1,184:
n/=2
);</lang>
 
=={{header|Panda}}==
Panda doesn't have explicit loops, instead we solve it by using the transitive closure operator. It applies a function to each successive value, each unique value is outputted. Our function halves, we make sure that the result is greater than 0 and add newline.
<lang panda>fun half(a) type integer->integer a.divide(2)
1024.trans(func:half).gt(0) nl
</lang>
 
=={{header|Pascal}}==