Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In case anybody is interested, this is how you would do this in clojure:

    (println (some-> article :author :address :city upper-case))


(some-> article :author :address :city upper-case println)

So that you don't print nil if some-> returns nil.


Thanks, I'm learning Clojure and things like this make me all warm and fuzzy inside :)


I didn't know about some->, that would have been handy recently.

Cheers.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: