I am moving this blog to kazimirmajorinc.com.
In the meantime, some posts may be unavailable.

Crawler Tractor.

Moved to kazimirmajorinc.com

4 comments:

  1. Just evaluated this 12996734 is like 30 seconds. Very interesting little piece of code. Thanks for sharing.

    ReplyDelete
  2. Very nice indeed!
    I made a "crawling" factorial function, just as a proof of concept.


    (define (f:f y)
      (begin
        (setq f:n 1)
        (setq f:current 0)
        (push
          '(if (> y 1)
             (begin
               (inc f:current)
               (setq f:n (* f:n y))
               (dec y)
               (if (and (> (length f:f) 3) (> f:current 2))
                 (pop f:f 2))
               (push (last f:f) f:f -1))
             f:n)
          f:f -1)))

    ReplyDelete
    Replies
    1. And another one, where the list to be pushed is modified instead of using variables.
      http://pastebin.com/HdQ8hiyx

      Delete