mini-lisp

command module
v0.0.0-...-42a0ae9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2019 License: MIT Imports: 9 Imported by: 0

README

mini-lisp

A small Lisp implementation in Go.

Examples

;; Factorial
(define fact (lambda (n) (if (<= n 1) 1 (* n (fact (- n 1))))))
(fact 5)
; 120

;; sum2 demonstrating tail recursion optimization
(define sum2 (lambda (n acc) (if (= n 0) acc (sum2 (- n 1) (+ n acc)))))
(sum2 1000 0)
; 500500

Features

  • REPL
  • Lambdas
  • Tail recursion optimization

References

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL