diff options
author | nea <nea@nea.moe> | 2023-08-10 01:37:33 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-10 01:37:33 +0200 |
commit | 74371302593ee2ee365e697911c364246f460b63 (patch) | |
tree | f4c8e5c4e7f31fbab219425795d967ed8b77e4d0 /res | |
parent | 7ce91434a452dc68f39aa34b646e691635c55e07 (diff) | |
download | nealisp-74371302593ee2ee365e697911c364246f460b63.tar.gz nealisp-74371302593ee2ee365e697911c364246f460b63.tar.bz2 nealisp-74371302593ee2ee365e697911c364246f460b63.zip |
Add builtins
Diffstat (limited to 'res')
-rw-r--r-- | res/builtins.lisp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/res/builtins.lisp b/res/builtins.lisp new file mode 100644 index 0000000..7bab9b4 --- /dev/null +++ b/res/builtins.lisp @@ -0,0 +1,16 @@ +(defun comment (...) ((pure nil))) +(comment "comment is a noop function for documentation") + + +(comment "if! a strict version of a regular if, meaning it evaluates both the falsy and the truthy case, instead of only one.") +(defun if! (cond ifTrue ifFalse) (if cond ifTrue ifFalse)) +(export if!) + +(comment "return immediately returns a value where an invocation is expected") +(defun return (value) ((pure value))) +(export return) + +(comment "noop is a do nothing function") +(defun noop () (return nil)) +(export noop) + |