lithia

Crates.iolithia
lib.rslithia
version1.0.6
sourcesrc
created_at2022-04-05 19:36:47.185285
updated_at2022-06-29 13:18:36.776119
descriptionEmbeddable and simple lisp dialect
homepage
repositoryhttps://github.com/hen6003/Lithia
max_upload_size
id562745
size51,841
(hen6003)

documentation

README

Lithia

lisp implemented in rust

Name

Name comes from another name for Lithium Oxide

Functions

  • quote Returns whatever its given, used for when you don't want to evaluate something
  • exit Exit lisp interpreter, number may be provided for exit code
  • =, set Sets a variable
  • def Define a global
  • defunc Define a global function
  • eval Evaluates the given object and what it returns
  • print Display an object
  • read Reads a line into objects
  • include Reads a file and evaluates it, returning the last object
  • while While first argument isn't nil, evaluates the rest
  • read Prompts for input and converts it to objects
  • func Creates a function
    • Use:
    (func (arg1 arg2)
    	(body)
    	(body)
    	return_value)
    
  • car, first Gets the first element in a dot-pair
  • cdr, next Gets the second element in a dot-pair

Math functions

  • +, add
  • -, sub
  • *, mul
  • /, div
  • %, mod
  • ==, eq
  • !=, ne
Commit count: 68

cargo fmt