All the arc releases going back to arc0 suffer from the following bug: arc> (let f prn:= (f x 3))
Error: "reference to undefined identifier: _x"
What's going on here? Since prn:assign is a function it evaluates all its args.But if that's true, how does this work? arc> (prn:= x 3)
3
3
The arc compiler has three clauses to make ssyntax work for macros in functional position. http://github.com/nex3/arc/blob/f01d3f9c66/ac.scm#L29
http://github.com/nex3/arc/blob/f01d3f9c66/ac.scm#L550
(It's taken me forever to understand those comments.)With its fexprs, wart can correctly implement compose by creating a first-class anonymous macro: mac compose($f $g)
`(lambda '$args
eval `(,,$f (,,$g ,@$args)))
(http://github.com/akkartik/wart/commit/73d9b58ad8) |