News for hackers. Stuff that matters.
Re:Practical Emacs Lisp by lispm on Friday September 11, 2015 @11:56PM (#10207169)
Nested DEFUNs? Not in Lisp. In Common Lisp use LABELS for recursive local functions.

I'd avoid recursive code like that as much as possible.

I'd write:

    (defun ab (l)
      (loop while l collect (pop l) into a
            while l collect (pop l) into b
            finally (return (list a b))))
Re:Practical Emacs Lisp by agumonkey on Saturday September 12, 2015 @06:41AM (#10207765)
Oops, I forgot defun affected the global namespace.

Your last example is nice. I had to read the CLHS loop to have a clue about linearity of multiple termination clauses though :)

ps: funny, while googling I even found some lisp checker with a rule about nested defuns (## define-lisp-pattern nested-defuns)

http://www.cs.northwestern.edu/academics/courses/325/program...