aboutsummaryrefslogtreecommitdiff
path: root/scheme/zebra.scm
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2026-02-14 22:46:03 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2026-02-14 22:46:03 +1300
commitbcb7a1156252da6cd16b7d3505e3f5b686a5669f (patch)
tree6ec75590b6fc71a08fc873430e1a82020e6bc801 /scheme/zebra.scm
parentb23d73cfa76919a726558e51bf0b0f0cc7c1575e (diff)
Changed Scheme benchmark tests to need manual code copy/paste from miniKanren for better performance comparisonsHEADmaster
Diffstat (limited to 'scheme/zebra.scm')
-rw-r--r--scheme/zebra.scm22
1 files changed, 16 insertions, 6 deletions
diff --git a/scheme/zebra.scm b/scheme/zebra.scm
index 9ba0fea..f33eba8 100644
--- a/scheme/zebra.scm
+++ b/scheme/zebra.scm
@@ -2,6 +2,16 @@
; Equivalent to example/zebra.adb
+
+; Place contents of mk.scm from simple-miniKanren here.
+; An equivalent microKanren implementation such as from the 2013 paper will also work.
+
+
+; Place contents of mkdefs.scm from simple-miniKanren here.
+; Be sure to leave out the (load "mk.scm") line.
+
+
+
(define (on-right l r li)
(conde
((fresh (z)
@@ -44,11 +54,11 @@
(fresh (w x y z) (membero `(,w ,x ,y zebra ,z) h))))
-(define (run-zebra args)
- (let* ((s (run 1 (h) (zebra h))))
- (for-each
- (lambda (x)
- (begin (display x) (newline)))
- (car s))))
+; Main program
+(let* ((s (run 1 (h) (zebra h))))
+ (for-each
+ (lambda (x)
+ (begin (display x) (newline)))
+ (car s)))