power
function, but cogen
needs to explicitly manipulate some coded representation of the
procedure. I handle this by extending the run time representation of
functions with their IR source.(cons (const cd) (cons ...) _ #t) --> (consIn this case the information is lost. This is a potential source of brittleness, though I can't imagine how it could happen.D
(cons ...) _ #t) -->D
If you were also to handle the
(cons (const cd) (cons ...) _ #t) -> (cons S D)case, then the car could be
S
instead of D
. Is this useful?
lift-if-circular
hints. Furthermore the cons
in the recursive
case should be marked as non-collapsing (haven't really confirmed
this last one yet, and there's no mechanism for that kind of hint
either (though they sure are easy to add)). Once this is working for
sure, then I'll explain it it more detail. More importantly, this
all should change for the simpler when real BTA becomes available.match
macro performs pattern matching
and destructuring. It's documentation is available here. I recommend
it.power-20
.
It can either be removed by the backend (here backend means either
the lisp compiler or DCG), or an optimizing interpreter can be used
(an interpreter that avoided the multiplication with an additional
case).duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
duck
goose