LLVM Scheme Compiler

Keywords: lisp
Created: 2019-07-22

Self-hosting compiler from a scheme dialect to LLVM IR code.

Source code on Github: l3kn/lisp-compiler-llvm

(defn range (from to)
      (if (eq? from to)
          (list from)
          (cons from
                (range (fxadd1 from) to))))
(defn fizzbuzz (n)
      (cond
        ((eq? (fxrem n 15) 0) (puts "FizzBuzz"))
        ((eq? (fxrem n 3) 0) (puts "Fizz"))
        ((eq? (fxrem n 5) 0) (puts "Buzz"))
        (else (inspect n))))

(for-each fizzbuzz (range 1 100))

Last export: 2020-07-17 Fri 23:16

If you have an idea how this page could be improved or a comment send me a mail.