Loops/Infinite
< Loops
Perform the same series of actions indefinitely.
Specifically print out "SPAM" followed by a newline in an infinite loop.
Ada
loop Put_Line("SPAM"); end loop;
C
while(1) puts("SPAM");
Common Lisp
(loop (write-line "SPAM"))
Groovy
while (true) { println 'groovy' }
Haskell
forever (putStrLn "SPAM")
Java
while(true) { System.out.println("SPAM"); }
Logo
forever [print "SPAM]
Perl
while(1){print"SPAM\n"}
Prolog
repeat, write('SPAM'), nl, fail.
Python
while 1: print "SPAM"
Ruby
while true do puts "SPAM" end