Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 863 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 863 Bytes

Haskell Lisp

A purely functional, typechecked Lisp written in Haskell.

(define ((fib int) (x int))
  (+.i (fib (-.i x 1) (-.i x 2))))

(define ((elem? bool) (x any) (xs list))
  (cond ((null? xs) false)
	((eq? (car xs) x) true)
	(true (elem? x (cdr xs)))))

Build and run using Stack.

$ stack build
$ stack run script.lisp # run a script
$ stack run -- -r       # repl

TODO List

  • Actual closures
  • IO capabilities
  • Tail-call optimization
  • General optimization

References