Skip to content

Comment on Critique of Lazy Sequences in Clojure

Comments

I've been using the trick with enforcing realization by serializing to strings a few times. Slow, but quite useful in many contexts. However, instead of using `(with-out-str (pr ...`, there's simply`pr-str`, which is easier to remember.

I'm typically using it like so:

  (defn realize [v] (doto v pr-str))

  (binding [*some* binding]
    (realize (f some-nested-lazy-seq)))
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.