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

For me, the following is a lot more readable than cadadr:

  (def coll [[1 2 3]
             [4 5 6]
             [7 8 9]])
  (second (second coll)) ; => 5
And often when I'm digging deep inside a nested data structure, I don't need just one piece of data, so destructuring comes in handy:

  (let [[[top-left]
         [_ middle] 
         [_ _ bottom-right]] coll]
    [top-left middle bottom-right]) ; => [1 5 9]


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: