Logo

Programming-Idioms

Write a loop that has no end clause.
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
loop
   null;
end loop;
while(1){
	// Do something
}
loop:
	goto loop;
#define forever while(1)
forever {
	// Do something
}
for(;;){
	// Do something
}
(loop []
  ;; do something
  (recur))
IDENTIFICATION DIVISION.
PROGRAM-ID. no end loop.
PROCEDURE DIVISION.
PERFORM UNTIL 1 < 0
   DISPLAY "Something"
END-PERFORM
STOP RUN.
while (true) {
	// Do something
}
for (;;) {
	/// Do something
}
while (true)
{
    // Do something
}
for (;;) {}
while (true) { }
while (true) {
  // do something
}
for (;;) {

}
defmodule Looping do
	def infinite do
		# Write code here	
		infinite
	end
end
loop() ->
	do:something(),
	loop().
do
end do
for {
	// Do something
}
while (true) { }
let x = x in x
import Control.Monad
forever (getLine >>= putStrLn)
import Control.Monad
forever $ pure ()
for(;;) {
	console.log('Oops')
}
while (true) {
	// to infinity
}
while (true);
for (;;);
do {} while (true);
for(;;){
	// Do something
}
while(true) {
	// Do something	
}
while (true) { }
(loop)
(defun infinite-loop (x)
  (apply x (infinite-loop x)))
while true do 
	-- Do something
end
::loop::
goto loop
repeat
until false
for (;;);
while (true) {
    // do something
}
While True do { nothing };
repeat until false;
say "" while True;
while (1) {
   do_stuff();
}
repeat, write("hello\n").
?- repeat, false.

% repeat/0 is built-in, but could be defined like this:
repeat.
repeat :- repeat.
loop :- loop.

?- loop.
while 1: ...
while True:
    pass
loop do
  # endless joy
end
loop {
	// Do something
}
while(true){
  println(3)
}
(let forever ()
  (forever))
[] repeat.
Do
    ' Do something
Loop