Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zaoqi committed Sep 2, 2017
1 parent 828f278 commit d0a7ca6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ zKanren
========
```racket
(require "zkanren.rkt")
(sizedstream->list (runzk (fresh (x y z) (conde [(== x y)] [(=/= x y)]))))
;; => '(((=/= ((<var:1> . <var:2>)))) ((== (<var:1> . <var:2>))))
(define-relation (r) (all succeed (r)))
(sizedstream->list (runzk (r))) ;; => '(())
(sizedstream->list (runzk- (r))) ;; => '(())
(define-relation (r2) (conde (succeed) ((r))))
(sizedstream->list (runzk (all (r2) fail))) ;; => '()
(sizedstream->list (runzk- (all (r2) fail))) ;; => '()
```

0 comments on commit d0a7ca6

Please sign in to comment.