Hacker News new | past | comments | ask | show | jobs | submit login

Why not extend the stack at runtime?

LispWorks:

    CL-USER 101 > (defun foo (n) (unless (zerop n) (cons n (foo (1- n)))))
    FOO

    CL-USER 102 > (foo 1000)

    Stack overflow (stack size 15998).
      1 (continue) Extend stack by 50%.
      2 Extend stack by 300%.
      3 (abort) Return to level 0.
      4 Return to top loop level 0.

    Type :b for backtrace or :c <option number> to proceed.
    Type :bug-form "<subject>" for a bug report template or :? for other options.

     CL-USER 103 : 1 > 
Now use restart 1 or 2.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: