-
Notifications
You must be signed in to change notification settings - Fork 8
Deep Combinators
andygill edited this page Jun 17, 2012
·
2 revisions
We have several different "deep" combinators that can dig into ASTs.
With unfold, there is no clear winner.
-
unfold matches as many arguments as possible, then tries to normalize them.
-
This mirrors what a human does with unfold (aka fold/unfold methodology)
-
any-bu matches the depth 0 before depth 1,2.., so does not get the best match
-
any-tu matches, but then descend into unfolded function (perhaps this is okay?)
-
prune-td matches the best "unfold match", but then does not handle the arguments to the function being unfolded. So
f . (g . h)
Only the outermost . gets unfolded.