|
|
|
|
|
by kazinator
2551 days ago
|
|
I fixed that in TXR Lisp. Macro bindings and function bindings in the global namespace are separate and coexist. The mboundp predicate is provided for testing for a macro binding, which can be undone with mmakunbound, analogous to fmakunbound https://www.nongnu.org/txr/txr-manpage.html#N-0384A294 TXR comes with function complements of if and and and some others. 1> (and (prinl 'foo) nil (prinl 'bar))
foo
nil
2> (mapcar 'and '(nil t nil t) '(nil nil t t ))
(nil nil nil t)
Unsurprisingly, TXR Lisp has no compiler macros. If you want to speed up a function using a macro, then just write a same-named macro.TXR Lisp macros can decline to expand by returning an output that is eq to their input. If a macro declines to expand, and a function exists, then that form will be treated as a call to that function, naturally. When a TXR Lisp lexical macro declines to expand, then a same-named macro in an outer scope (or else the global environment) is thereby effectively unshadowed and gets an opportunity to expand the input. This is very useful and exploited in the implementation of tagbody, which it simplifies. http://www.kylheku.com/cgit/txr/commit/share/txr/stdlib/tagb... |
|