This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-08
Channels
- # aleph (10)
- # announcements (4)
- # beginners (25)
- # calva (4)
- # cider (56)
- # clj-kondo (10)
- # cljdoc (1)
- # cljs-dev (58)
- # clojure (42)
- # clojure-austin (5)
- # clojure-dev (90)
- # clojure-europe (2)
- # clojure-greece (2)
- # clojure-italy (3)
- # clojure-nl (63)
- # clojure-quebec (1)
- # clojure-seattle (2)
- # clojure-spain (4)
- # clojure-spec (19)
- # clojure-uk (25)
- # clojuredesign-podcast (5)
- # clojurescript (24)
- # cursive (15)
- # datomic (1)
- # events (1)
- # figwheel-main (10)
- # fulcro (62)
- # graphql (7)
- # keechma (11)
- # nrepl (1)
- # off-topic (12)
- # re-frame (8)
- # reitit (2)
- # remote-jobs (3)
- # shadow-cljs (127)
- # specter (1)
- # sql (43)
- # testing (2)
- # tools-deps (30)
- # xtdb (1)
@nate @neumann Hi! I like your podcast. It's nice to follow along in the thought processes--that's often missed in blogs etc. A comment on the last episode; you said you couldn't avoid using lazy-seq
. You can use iterate
though, like (->> lines (iterate rest) (take-while seq) (map parse-next) (filter some?))
.
@lodin.johan Welcome! Glad to have you here!
@lodin.johan Thank for the feedback. I'll have to try that out. I haven't used iterate
like that before.
@neumann Thanks! Yeah, it's pretty useful. I've used it when I needed the function to "consume" the sequence as well. In that case I iterate over [nil lines]
with (fn [[_ lines]] (when (seq lines) (f lines)))
where f
should return [thing remaining-lines]
. (`f` should return [nil (rest lines)]
if it "does nothing" instead of nil
.)