This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-28
Channels
- # announcements (5)
- # babashka (7)
- # beginners (101)
- # biff (9)
- # calva (46)
- # cider (6)
- # clj-yaml (2)
- # cljsrn (13)
- # clojure (11)
- # clojure-europe (43)
- # clojure-nl (13)
- # clojure-norway (22)
- # clojurescript (20)
- # conjure (1)
- # cursive (7)
- # data-science (2)
- # datomic (26)
- # emacs (38)
- # graphql (27)
- # gratitude (5)
- # hoplon (8)
- # hugsql (22)
- # humbleui (2)
- # hyperfiddle (6)
- # introduce-yourself (8)
- # joyride (3)
- # lsp (79)
- # malli (6)
- # nbb (67)
- # portal (16)
- # rdf (27)
- # reagent (42)
- # releases (2)
- # remote-jobs (1)
- # shadow-cljs (36)
- # test-check (17)
- # tools-deps (1)
- # xtdb (15)
Thank to the Clojure team for clojure.core/iteration and core.async/pipeline it is exactly the right abstraction and saves me a lot from imperative code
this makes me very happy! if you want to share about how you are using iteration
, I'm curious
agreed here! i just used it yesterday to run through all the pages of my calendar via the google API to automate exports 🙏:skin-tone-2:
an api , notion, returns a paginated results of ids and a next key to fetch extra results. I was fetching the results imperatively and my business logic was deep inside the loop. One day I took a look at clojure cheatsheet and suprise clojure.core 1.11 has an interesting function called iteration. Oh it returns a seqable and reducable object to fetch api's. this is exactly what I want with clojure.core.async/onto-chan and clojure.core.async/pipeline my function ran with the same speed and more concise
what was like a 20 or so line function is just 3 lines, one for fetching one for pipeline to fetch result for each id and one for reducing