Last active
December 12, 2015 00:49
-
-
Save jcromartie/4686797 to your computer and use it in GitHub Desktop.
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
////////////////////////////////////////// | |
// Why it's painful to write Objective-C: | |
////////////////////////////////////////// | |
NSString *tagString = [[storyThreadInfo valueForKeyPath:@"interests.name"] componentsJoinedByString:@" "]; | |
;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; After writing Clojure: | |
;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(->> thread :interests (map :name) (string/join " ")) | |
########### | |
# Or Ruby: | |
thread.interests.map(&:name).join(" ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment