I agree with using the trush operator since that certainly is a pipeline.
A few comments though:
(fn [image] [(:size image) (:#text image)])
Can be changed to:
(juxt :size :#text)
I wouldn't do api/get in search, the function is much easier to test if you
keep it pure.
Setup unittests with ex
I'll definitely take a look but mostly just to see style :). It is a toy
app purely for learning so I can get away with duplicating a bit of effort.
Plus I only use read only end points that don't require user auth so the
api code is really short (8 lines).
--
--
You received this message b
Raynes recently released https://github.com/Raynes/least, a Clojure client
for the last.fm API. Have you looked into just using his, rather than
reinventing the API layer yourself?
On Tuesday, April 23, 2013 2:12:37 PM UTC-7, Huey Petersen wrote:
>
> Howdy,
>
> I'm a clojure fan but quite new to
Thanks, superficial changes are good too :)
One question I forgot that is important is:
- how would I accomplish the 'maybe' monad style where the web service call
would return nil? on failure. Is the normal pattern for this an if-let at
the top before the rest of the transformations are
I'm also quite new to Clojure, but here are some very superficial changes I
would make to your code, without actually giving much thought to your
algorithms:
(defn- transform-album-images [images]
(into {} (for [image images]
[(:size image)
(:#text image)])))
(defn- t