To safely test if an arbitrary seq is realized (non-lazy), we need a wrapper like:
(defn seq-realized? [s]
(if (instance? clojure.lang.IPending s)
(realized? s)
true))
If {{realized?}} returned true for an ({{ISeq}}?) instance that is not {{IPending}} there would be less surprising behavior for cases such as, {{(realized? (range 10))}} which throws exception.
NB: A follow-up to CLJ-1751.