Re:Functional programming, APL and UNIX pipes
by dkersten on Monday May 24, 2010 @02:30AM
(#1373946)
One commonly used parsing word is INFIX: which, as you would expect from the name, allows you to write equations in infix notation rather than the default postfix. Macros work exactly like someone familiar with lisp would expect them to.
http://factor-language.blogspot.com/2009/09/survey-of-domain...
pretty much the same as lisp's. MACRO: defines a lisp style macro, http://docs.factorcode.org/content/word-MACRO__colon__%2Cmac... (MACRO:: defines a macro with local variables)
SYNTAX: defines a 'parsing word' http://docs.factorcode.org/content/article-parsing-words.htm... which I think is basically the same as a lisp Reader Macro
Though you don't seem to need macros very often because you tend to pass things around as lambdas, cond for instance is implemented as a normal function.