Created
July 15, 2012 23:09
-
-
Save anonymous/3119100 to your computer and use it in GitHub Desktop.
clojure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=> (-> "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