Hacker News new | past | comments | ask | show | jobs | submit login

  (get "foo" 0)          ; \f
  (get {:foo 'bar} :foo) ; bar
  (get #{0 1 2} 1)       ; 1
  (get [:a :b :c] 1)     ; :b

  (def path [0 :foo 1])
  (get-in [{:foo "bar"} 1 2] path) ;\a
Being able to deal with data generically in a first class manner is very, very useful. You can only get this in all the languages you've mentioned (including JS) w/ more or less custom code writing.



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

Search: