Skip to content

Instantly share code, notes, and snippets.

Created July 15, 2012 23:09
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 anonymous/3119100 to your computer and use it in GitHub Desktop.
Save anonymous/3119100 to your computer and use it in GitHub Desktop.
clojure
=> (-> "two words" #(clojure.string/split % #" ") last)
CompilerException java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.ISeq, compiling:(NO_SOURCE_PATH:1290)
=> (defn splitwords [str] (clojure.string/split str #" ")
=> (-> "two words" splitwords last)
"words"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment