Skip to content

Instantly share code, notes, and snippets.

@jrheard
Created February 17, 2013 20:38
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 jrheard/a0d103dbb4f64f51aecd to your computer and use it in GitHub Desktop.
Save jrheard/a0d103dbb4f64f51aecd to your computer and use it in GitHub Desktop.
buggy nodes-existo
(defne nodes-existo [condition nodes out]
([_ [] out])
([_ [?node . ?remaining-nodes] out]
(conde
[(condition ?node) (== ?node out)]
[(nodes-existo condition ?remaining-nodes out)]
[(matche [?node]
([[_ _ . ?children]] (nodes-existo condition ?children out)))])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment