streamline code generation with iterators and traits

This commit is contained in:
Mark Thom
2017-01-22 11:24:29 -07:00
parent 9be3445517
commit ed2343be9f
10 changed files with 339 additions and 244 deletions

View File

@@ -27,8 +27,6 @@ l0> ?- p(z, w).
no
l0> ?- p(w, w).
yes
l0> ?- p(Z, w).
yes
l0> ?- p(Z, h(Z, W), f(W)).
no
l0> p(Z, h(Z, W), f(W)).
@@ -42,4 +40,15 @@ yes
l0> ?- p(z, h(Z, w), f(w)).
yes
l0> quit
```
## Occurs check
There's no occurs check, so cyclic terms do unify:
```
l0> p(W, W).
Program stored.
l0> ?- p(f(f(W)), W).
yes
```