Skip to content

Instantly share code, notes, and snippets.

@jirkamarsik
Created December 17, 2012 23:52
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 jirkamarsik/4323541 to your computer and use it in GitHub Desktop.
Save jirkamarsik/4323541 to your computer and use it in GitHub Desktop.
A variadic appendo for core.logic.
(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