Fork me on GitHub
#code-reviews
<
2015-08-30
>
screamish12:08:23

very much a clojure beginner and would love to know how idiomatic this is

screamish12:08:27

(defn lazy-get
  [f x]
  (if-let [result  (f x)]
    (cons result
          (if-let [x' (result :next)]
            (lazy-seq (lazy-get f x'))
            nil))))

potetm14:08:06

@screamish looks reasonable to me. I didn't know you could use a quote in that context (`x'`). I think usually I would use x*. But I see no glaring issues.

potetm14:08:14

Assuming it works ;) I'm not able to test it out at the moment.