Created
July 11, 2012 18:56
-
-
Save amalloy/3092368 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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