3 ms·
I suppose CL/Scheme programmers just learn by heart what those combinations do (ie. what kind of structure they work with), because to me both cadadr and the (f
by chousuke 16y ago
I suppose CL/Scheme programmers just learn by heart what those combinations do (ie. what kind of structure they work with), because to me both cadadr and the (first (rest ...)) sequence are equally meaningless at first glance. It's not easy to see what the data structure looks like.
In Clojure it's usually more idiomatic to use destructuring, which I think is much more understandable since the form follows the structure that is being accessed.
Or you can use get-in, which takes a sequence of keys to dig into a deep associative data structure. It doesn't work with sequences, but building highly nested seqs is rather uncommon in Clojure.
- gtani 16y agoor the "->" ("threading") macro, a recursive solution, or a lib like http://groups.google.com/group/clojure/browse_frm/thread/11a7203021382ad8# http://groups.google.com/group/clojure/browse_frm/thread/11a...