Skip to content

Instantly share code, notes, and snippets.

@amalloy
Created July 11, 2012 18:56
Show Gist options
  • Save amalloy/3092368 to your computer and use it in GitHub Desktop.
Save amalloy/3092368 to your computer and use it in GitHub Desktop.
(defn everyo [pred coll]
(conde [(emptyo coll)]
[(fresh [head tail]
(conso head tail coll)
(pred head)
(everyo pred tail))]))
;; still broken
(defne everyo [pred coll]
([_ ()])
([p [x . d]]
(p x)
(everyo p d)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment