Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
tizoc committed Aug 9, 2024
1 parent 62d2a84 commit 8702c49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shen-test-programs/prologinterp.shen
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

(define occurs-check?
{term --> term --> boolean}
X Y -> (and (variable? X) (not (occurs? X Y))))
X Y -> (and (variable? X) (not (my-occurs? X Y))))

(define dereference
{term --> (list (term * term)) --> term}
Expand All @@ -71,10 +71,10 @@
X [(@p X Y) | _] -> Y
X [_ | Y] -> (lookup X Y))

(define occurs?
(define my-occurs?
{term --> term --> boolean}
X X -> true
X [Y | Z] -> (or (== X Y) (some (/. W (occurs? X W)) Z))
X [Y | Z] -> (or (== X Y) (some (/. W (my-occurs? X W)) Z))
_ _ -> false)

(define some
Expand Down

0 comments on commit 8702c49

Please sign in to comment.