[ANN] 'Elements of Clojure' is complete

2018-12-02 Thread Zach Tellman
I'm very happy to announce, only two and a half years after the release of the first chapter, that Elements of Clojure is completely finished. Further details can be found here: https://groups.google.com/forum/#!topic/elements-of-clojure/UUJjqU1rllU. If you've never heard of the book before, p

Re: [ANN] 'Elements of Clojure' is complete

2018-12-02 Thread Colin Yates
That’s awesome - congratulations! Sent from my iPhone > On 2 Dec 2018, at 23:25, Zach Tellman wrote: > > I'm very happy to announce, only two and a half years after the release of > the first chapter, that Elements of Clojure is completely finished. Further > details can be found here: > ht

How to use defrecord getBasis to look up record instance field values

2018-12-02 Thread beginner . clojure
defrecord Person [name age company]) (def p1 {:name "foo", :age 27, :company :bar}) (map #(% p1) (keys p1)) ("foo" 27 :bar) user=> (map #(% p1) (Person/getBasis)) (nil nil nil nil) user=> (map #(class %) (Person/getBasis)) (clojure.lang.Symbol clojure.lang.Symbol clojure.lang.Symbol clojure.l

Re: How to use defrecord getBasis to look up record instance field values

2018-12-02 Thread Andy Fingerhut
Maybe you are looking for something like this? (map #(% p1) (map keyword (Person/getBasis))) keyword can take a symbol as argument, and return a corresponding keyword. Andy On Sun, Dec 2, 2018 at 8:31 PM wrote: > > defrecord Person [name age company]) > > (def p1 {:name "foo", :age 27, :compa