The MDL bumper sticker, "my other 1 is a REST", just doesn't have the same ring to it.
<PRSI? ,FOO>
should become <==? ,PRSI ,FOO>
The way to write that macro is to call FORM to build the form: <DEFMAC PRSI? (X)
<FORM ==? ',PRSI .X>>
But if it's a complex block of code, and the blanks I want to fill in are deeply nested, the template quickly becomes unreadable, because every structure turns into a form, and every form turns into a call to FORM. <SETG X 0> ;FORM
(NORD BERT) ;LIST
[1 MONEY 2 SHOW] ;VECTOR
"Bracket-ish" ;STRING
{ what goes here? } ;TEMPLATE
Then you got your exciting brackets, where the first ! is mandatory but the second is optional: !<REST .FOO!> ;SEGMENT
![2 4 8 16 32 64!] ;UVECTOR
Then you got your hashtag brackets, which pop up in the corner of the TV screen reminding you that there's another way to CHTYPE: #FORM (+ 1 2) ;"same as <+ 1 2>"
And your hashtag voucher brackets, which are really just defective angle brackets you can exchange for a free hashtag: <> ;"evaluates to #FALSE ()"
Finally, you got your bogus brackets, things that look like they could be a new kind of exciting brackets, but when you look closely they're just prefix operators that tend to appear before brackets: '(OSCAR WILDE) ;"same as <QUOTE (OSCAR WILDE)>"
%<+ 1 2> ;"evaluate immediately"
%%<CRLF> ;"evaluate and discard result"
See also: https://github.com/taradinoc/mdl-docs/blob/master/docs/07-st... <DEFINE FOO () ...>
is equivalent to <SETG FOO <FUNCTION () ...>>
But EVAL will fall back to the LVAL if the atom doesn't have a GVAL. In other words: <A B C>
is equivalent to <APPLY <COND (<GASSIGNED? A> ,A)
(<ASSIGNED? A> .A)
(T <ERROR>)>
B
C>
https://github.com/taradinoc/mdl-docs/blob/master/docs/03-bu...