re: Challenge: Write a program that never stops VIEW POST

TOP OF THREAD FULL DISCUSSION
re: function a(){ a(); } a(); Endless recursivity!
 

This will crash once the stack is full but nice try. :)

 

Hahaha yeah it totally did crash Chrome when I tried it. I wanted to just post

while(true){}

but that's a little boring.

 

Use a language that allows optimization of tail recursion then ¯_(ツ)_/¯

Us cool kids with our tail recursion could write in, for example, Common Lisp:

(defun loop-for-ever ()
  (loop-for-ever))
(loop-for-ever)
code of conduct - report abuse