Skip to content

Instantly share code, notes, and snippets.

@ulises
Created April 21, 2013 18:55
Show Gist options
  • Select an option

  • Save ulises/5430614 to your computer and use it in GitHub Desktop.

Select an option

Save ulises/5430614 to your computer and use it in GitHub Desktop.
(defmacro p-source [form]
"Declare an expresion as a source of data."
(if (and (sequential? form)
(instance? clojure.lang.Fn (first form)))
`(each ~(first form) ~(rest form))
(if (sequential? form)
`(map immediately ~form)
`(list (immediately ~form)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment