This is a set of examples for various operators. If you want to see their documentation, checkout the Operators page.
Compiles an entire program into a single executable expression. You can define other constants within it.
;; Doubles the value as the output.
(* value 2)
Includes all of the constants defined in a library file in the module.
cdv clsp retrieve sha256tree
;; Includes the constants defined in the file.
;; Calls the utility function as the output.
Defines a function that can be called from anywhere within the module.
(defun square (number)
;; Returns the number squared.
(* number number)
(square 16) ; 256
Defines an inline function that can be called from anywhere within the module. It simply replaces the call with the code within (like an easier to write but limited macro).
(defun-inline double (number)
;; Returns twice the number.
(* number 2)
(double 9) ; 18
Compiles a block of code into a single executable expression. Useful for writing functions as arguments to other functions.
(lambda (n1 n2)
;; Returns the two added together.
(+ n1 n2)
defmacro, qq, unquote
Defines a macro that can manually structure the source code it is replaced with. Allows for advanced compile time behavior.
(defmacro or ARGS
(qq (if (unquote (f ARGS))
(unquote (c or (r ARGS)))
Defines a constant value that can be referenced by name.
(defconstant MAGIC_NUMBER 314159)
MAGIC_NUMBER ; Replaced with the actual value.