Created
December 17, 2012 23:52
-
-
Save jirkamarsik/4323541 to your computer and use it in GitHub Desktop.
A variadic appendo for core.logic.
This file contains 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 poly-appendo | |
"Like clojure.core.logic/appendo, but works with arbitrary number of | |
args, like clojure.core/concat." | |
([x y] | |
(== x y)) | |
([x y & more] | |
(fresh [z] | |
(apply poly-appendo z more) | |
(appendo x y z)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment