[LOGIC-89] Allow application again in pattern matches Created: 01/Jan/13 Updated: 07/Jan/13 |
|
| Status: | Open |
| Project: | core.logic |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Major |
| Reporter: | David Nolen | Assignee: | David Nolen |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | 0.8.0 | ||
| Description |
|
Perhaps we can support simple function application in the following manner. (defne substo [e new a out] (['(var ~a) _ _ new]) (['(var ~y) _ _ '(var ~y)] (nom/hash a y)) (['(app ~rator ~rand) _ _ '(app ~rator-res ~rand-res)] (substo rator new a rator-res) (substo rand new a rand-res)) (['(lam ~(nom/tie c body)) _ _ '(lam ~(nom/tie c body-res))] (nom/hash c a) (nom/hash c new) (substo body new a body-res))) If we have a seq in an unquote then we know we have an application. All function symbols are left alone, all arguments are considered to be fresh vars or locals. |