π Node [[lisp primitives]]
π
lisp-primitives.md (text) by @ryan
Lisp primitives
tags : [[Lisp]] [[programming languages]] [[Dial]] [[Dial implementation]]
When implementing a Lisp in particular, the goal should be to express the totality of the Lisp with only a minimal set of implementation language code. For example, it wouldnβt make a lot of sense to implement when
in the source language (say, C) when, if if
is implemented, it could be expressed as if
[^fn:1].
Primitives include but are not limited to:
- Basic data types
- Any arithmetic
lambda
or equivalentif
cond
list
apply
defmacro
quote
The rest of a Lisp is simply library code, which can be expressed using all of the above.
Footnotes
1 In fact, it could be expressed like this:
; a copy of emacs's own =when= definition
(defmacro my-when (condition &rest body)
(list 'if condition (cons 'progn body)))
(macroexpand '(my-when t
(message "hello world I did it")))
Loading context... (requires JavaScript)
ποΈ Stoas for [[lisp primitives]]
π Open document (Hedgedoc) at https://doc.anagora.org/lisp-primitives
π Open document (Etherpad) at https://stoa.anagora.org/p/lisp-primitives
πΉ Video conferencing space (Jitsi Meet) at https://meet.jit.si/lisp-primitives
π Full text search for [[lisp primitives]]