code-reviews

screamish 2015-08-30T12:48:23.000006Z

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

screamish 2015-08-30T12:48:27.000007Z

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

2015-08-30T14:16:06.000009Z

@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.

2015-08-30T14:17:14.000010Z

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

screamish 2015-08-30T23:34:05.000018Z

cheers