Skip to content

dzharvis/lesp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Much worse version of Lisp

Try it here https://dzharvis.github.io/lesp/

Note: Due to some bug with web assembly, may not work with some versions of chrome

Building

Local console app

  • cargo run

Web app

  • cargo install cargo-web
  • cargo web start --features web-spa
  • Open http://[::1]:8000 in your browser

Usage example

>> (reduce (list 1 2 3) 0  )
<< 6

>> (map (list 1 2 3) square)
<< [1, 4, 9]

>> (defn add (a b) (  a b))
<< "add"

>> (add 10 20)
<< 30

Notes

  • Empty list works as nil
  • Everything is immutable
  • Numbers are only positive
  • No string support