Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zaoqi committed Sep 3, 2017
1 parent cef41e1 commit 1d02a7c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ zKanren
========
```racket
(require "zkanren.rkt")
(runzk* () fail) ;; => '(())
(define-relation (r) (all succeed (r)))
(sizedstream->list (runzk- (r))) ;; => '(())
(define-relation (r2) (conde (succeed) ((r))))
(sizedstream->list (runzk- (all (r2) fail))) ;; => '()
(runzk* () (r)) ;; => '(() ())
(define-relation (r2) (conde (succeed) ((r2))))
(runzk* () (all (r2) fail)) ;; => '(())
```

0 comments on commit 1d02a7c

Please sign in to comment.