Skip to content

Instantly share code, notes, and snippets.

@unfo
Created January 12, 2010 17:50
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 unfo/5005a3004cf58b1b7df3 to your computer and use it in GitHub Desktop.
Save unfo/5005a3004cf58b1b7df3 to your computer and use it in GitHub Desktop.
(def chans (re-seq #"#[^ ]+" "#dev-1 #dev-2"))
(println "class of channels: " (class chans) "; and count is " (count chans))
(println "first: " (first chans))
(println "rest: " (rest chans))
(map #(println "should've joined " %) chans)
(println "autojoin should've fired by now")
--
output:
class of channels: clojure.lang.LazySeq ; and count is 2
first: #dev-1
rest: (#dev-2)
autojoin should've fired by now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment