by ``output>array``, and fry with arrays. We need to expand macros before doing the locals transform ``rewrite-closures`` and fry needs to happen in the locals pass because the locals pass touches the retainstack as part of the transform and we only want to do this once. We defer fry by making a <fryable> which rewrite-closures transforms. Fixes things like the following that used to break because the locals transform happened before fry. ::: bar ( a b -- a ) '[ |[ a | a _ + ] call ] call ; Also we can use fry in case/cond now since macro-expansion happens first. Things like this work: ::: foo ( a b c -- a ) :> ( a b c ) c q{{ a b c a b + c _ }} ; 1 2 4 foo ... { 1 2 4 3 4 4 } Triple colon will become colon soon. Finally, there is a potential issue with macros changing the order of fry underscore expansion since fry happens later. We need to rewrite fry internally as 0_ 1_ 2_ so order is preserved everywhere in the expanded macro. |
||
---|---|---|
.. | ||
short-circuit | ||
smart | ||
authors.txt | ||
combinators-docs.factor | ||
combinators-tests.factor | ||
combinators.factor | ||
summary.txt |