Skip to content

Instantly share code, notes, and snippets.

@austinhaas
Created February 14, 2013 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austinhaas/4955349 to your computer and use it in GitHub Desktop.
Save austinhaas/4955349 to your computer and use it in GitHub Desktop.
(ns test
(:refer-clojure :exclude [==])
(:require
[clojure.core.logic :refer :all]))
(defn foo [in out]
(matcha
[in out]
([('and a b . ()) ('and x y . ())] (foo a x) (foo b y))
([a ('bar ('baz a . ()) . ())])))
;; I get a stack overflow with the following, but if I remove one conjunct, then it will run.
(run 1 [q] (foo
'(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p p)))))))))))
q))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment