/lisp-inrs

Interpreter of Lisp in Rust

Primary LanguageRust

Interpreter of Lisp language

For learning purposes

Features ☕

  • Various Data Types

    • String "Jona"
    • Integer 10
    • Float 3.1416
    • Lambda (lambda (x) (+ x 1))
    • Boolean true
  • Built-in Functions

    • + Add
    • - Subtract
    • * Multiply
    • / Divide
    • ^ Pow
    • define For define variables and functions
    • load For loading files
    • print For Debugging

Examples

  • Add two numbers
(define add (lambda (x y) (+ x y)))
(add 5)
  • Circle area
(define pi 3.1416)
(define circle-area (lambda (r) (* pi (* r r))))
(circle-area 5)
  • Print Hello World
(print "Hello World")