Anonymous user
Loops/While: Difference between revisions
→{{header|J}}
(added J) |
|||
Line 75:
J is array-oriented, so there is very little need for loops. For example, one could satisfy this task this way:
J does support loops for those times they can't be avoided (just like many languages support gotos for those time they can't be avoided).
3 :
while. 0 < y do.
y 1!:2 ] 2
y =. <. -: y
end.
i. 0 0
)
Though it's rare to see J code like this.
|