News for hackers. Stuff that matters.
Re:LIPS: Powerful Scheme based Lisp interpreter in JavaScript by tmtvl on Sunday December 31, 2023 @12:46PM (#38825893)
Gambit has tail call optimisation:

  > (define (fib x)
      (let loop ((a 0)
                 (b 1)
                 (c 0))
        (if (= c x)
            a
            (loop b
                  (+ a b)
                  (+ c 1)))))
  > (fib 10)
  55
  > (fib 100)
  354224848179261915075
  > (fib 1000)
  43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875

There are no comments on this comment yet.