ExLisp (exlisp v0.1.2)
Copy MarkdownDocumentation for ExLisp.
Summary
Functions
Calls a Lisp function with the given arguments list.
Compiles a Lisp file into a BEAM module and outputs the .beam file.
Compiles a Lisp code string into a BEAM module.
Returns the default .beam output directory.
Deletes a Lisp global variable.
Evaluates a Lisp code string.
Evaluates Lisp code and formats symbols in uppercase for REPL display.
Formats a Lisp code string according to standard Common Lisp conventions.
Reads a Lisp file and returns the formatted code.
If option in_place: true or write: true is given, it overwrites the file.
Gets a Lisp function as an Elixir anonymous function.
Gets the value of a Lisp global variable.
Checks if a Lisp function is defined.
Checks if a Lisp global variable is defined.
Loads a Lisp source file and evaluates each top-level expression sequentially.
Sets a Lisp global variable.
Converts data for REPL display, turning symbols/atoms to uppercase.
Functions
Calls a Lisp function with the given arguments list.
Examples
iex> ExLisp.eval("(defun multiply (a b) (* a b))")
:multiply
iex> ExLisp.call(:multiply, [3, 4])
12
iex> ExLisp.call("MULTIPLY", [5, 6])
30
Compiles a Lisp file into a BEAM module and outputs the .beam file.
Compiles a Lisp code string into a BEAM module.
Returns the default .beam output directory.
Deletes a Lisp global variable.
Evaluates a Lisp code string.
Examples
iex> ExLisp.eval("(+ 1 2)")
3
iex> ExLisp.eval("(* 2 3 4)")
24
Evaluates Lisp code and formats symbols in uppercase for REPL display.
Formats a Lisp code string according to standard Common Lisp conventions.
Examples
iex> ExLisp.format("(+ 1 2)")
"(+ 1 2)\n"
Reads a Lisp file and returns the formatted code.
If option in_place: true or write: true is given, it overwrites the file.
Gets a Lisp function as an Elixir anonymous function.
Examples
iex> ExLisp.eval("(defun add (a b) (+ a b))")
:add
iex> add = ExLisp.get_fun(:add)
iex> add.(2, 3)
5
Gets the value of a Lisp global variable.
Examples
iex> ExLisp.eval("(defparameter x 100)")
:x
iex> ExLisp.get_var(:x)
100
iex> ExLisp.get_var("X")
100
Checks if a Lisp function is defined.
Checks if a Lisp global variable is defined.
Loads a Lisp source file and evaluates each top-level expression sequentially.
Sets a Lisp global variable.
Examples
iex> ExLisp.set_var(:y, 200)
200
iex> ExLisp.eval("y")
200
Converts data for REPL display, turning symbols/atoms to uppercase.