Skip to content

Instantly share code, notes, and snippets.

@micmarsh
Last active December 30, 2015 22:39
Show Gist options
  • Save micmarsh/7895142 to your computer and use it in GitHub Desktop.
Save micmarsh/7895142 to your computer and use it in GitHub Desktop.
Persistent Queue In Clojure
; Clojure actually has a queue type, but it's not easily accesible. Here's a function to help with that
(defn queue
([] clojure.lang.PersistentQueue/EMPTY)
([& elements]
(into (queue) elements)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment