Re: Idiomatic program for someone new to Clojure

2020-12-15 Thread James Lorenzen
just doing that to sort of document the method. That sound about right? On Tuesday, December 15, 2020 at 2:33:08 PM UTC-6 James Lorenzen wrote: > Thanks for the suggestions aditya. I definitely like where you are headed. > I have a few questions. This syntax in `pipeline-build-co

Re: Idiomatic program for someone new to Clojure

2020-12-15 Thread James Lorenzen
ll suggestion: you don't need to nest let inside let, a clause >>>> can use previous clauses: >>>> >>>> (defn get-latest-build >>>> [pipeline] >>>> (let [response (fetch-pipeline pipeline) >>>> json (parse-string (:b

Re: Idiomatic program for someone new to Clojure

2020-12-14 Thread James Lorenzen
peline] >> (let [response (fetch-pipeline pipeline) >> json (parse-string (:body response) true)] >>(get-in json [:pipelines 0 :counter]))) >> >> finally, this can now be simplified into a single threading macro: >> >> (defn get-latest-b

Idiomatic program for someone new to Clojure

2020-12-14 Thread James Lorenzen
can I prevent it from returning the nils at the end? I know this is returning nil for each map'd item; I just don't know the best way to prevent that. Thanks, James Lorenzen -- You received this message because you are subscribed to the Google Groups "Clojure" group