How to break out of an infinite loop in lisp? (enviroment: emacs)?

(loop (setq x (read)) (if (eq x 'exit) (return) (print (eval x)))).

Thank you. I'd better follow this routine. – Josh Morrison Jul 19 at 6:43.

Emacs modes often send an interruption signal to the inferior program only when you hit Ctrl-C twice in a row (i.e. , the key sequence you are looking for is C-c C-c). In particular, this is true for SLIME.

This is because C-c is a prefix key that is usually combined with other keys to access a whole bunch of mode-specific features.

Reference psg.com/~dlamkins/sl/chapter05.html Most of the time you write a LOOP form, you'd like to have a way out. Fortunately, a RETURN form anywhere inside will cause control to leave the LOOP; any value you specify becomes the value of the LOOP form:? (loop (print "Here I am.") (return 17) (print "I never got here.

")) "Here I am. " 17 RETURN is normally used in a conditional form, like this:?(let ((n 0)) (loop (when (> n 10) (return)) (print n) (prin1 (* n n)) (incf n))) 0 0 1 1 2 4 3 9 4 16 5 25 6 36 7 49 8 64 9 81 10 100 NIL?

Informative. Thanks. – Josh Morrison Jul 19 at 6:43.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions