Cross-posting from #beginners: Is there some way to prevent Portal from printing infinite sequences? https://clojurians.slack.com/archives/C053AK3F9/p1710434608001979
Currently, Portal doesn't try to deal with infinite seqs but you can deal with them in a custom submit function such as:
(require '[clojure.walk :as walk])
(defn truncate-seqs [v]
(walk/prewalk #(if (seq? %) (take 10 %) %) v))
(add-tap (comp portal.api/submit truncate-seqs))
(tap> (range))In very early versions of Portal, it did try to handle infinite lazy seqs, but it made the client much more complicated and I found myself not needing it very often.
@djblue Thank you!