This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-02
Channels
- # announcements (9)
- # babashka (67)
- # beginners (62)
- # bitcoin (2)
- # clara (1)
- # clj-kondo (62)
- # cljfx (6)
- # cljs-dev (25)
- # clojars (17)
- # clojure (142)
- # clojure-australia (2)
- # clojure-europe (42)
- # clojure-gamedev (2)
- # clojure-nl (31)
- # clojure-poland (10)
- # clojure-spec (14)
- # clojure-uk (30)
- # clojurescript (3)
- # conjure (1)
- # cursive (10)
- # data-science (1)
- # datascript (4)
- # datomic (9)
- # depstar (7)
- # fulcro (17)
- # girouette (15)
- # graalvm (44)
- # honeysql (20)
- # jackdaw (3)
- # jobs (8)
- # jobs-discuss (10)
- # juxt (5)
- # lein-figwheel (1)
- # lsp (175)
- # malli (19)
- # pedestal (2)
- # reagent (31)
- # reitit (2)
- # remote-jobs (3)
- # reveal (12)
- # sci (77)
- # shadow-cljs (22)
- # specter (6)
- # startup-in-a-month (2)
- # tools-deps (1)
- # xtdb (21)
Ok, thank you. I remember using Dreamweaver too. It was very advanced for those times.
I feel rough as, horrible sore throat, which I don't know if it's due to the cold I seem to have or the covid test I went for yesterday as a precaution where I had to rub a brush on my tonsils, which are the main thing hurting (it was negative)
Say you had to transform this [:a :b :c :d]
to this [[:a :b] [:b c:] [:c :d]]
Thoughts?
(->> [:a :b :c :d] (partition 2 1) (mapv vec))
@U11EL3P9U Also works as a transducer if you use partition-all
(into [] (partition-all 2) [:a :b :c :d])
If you want this form because you’re wanting to build a map you can also skip the intermediate collections and do:
(into {} (partition-all 2) [:a :b :c :d])
oh sorry didn’t notice you wanted the step
It's interesting that the Kotlin equivalent is list.zipWithNext(). I wonder if people tend to do it more in Kotlin land, enough to warrant a library method?
i feel like you could do that with juxt but my brain isn't in the zone rn
ahh yes cos you need the prev element
you're right
i've been working on an effectful lib for clj/s ... not quite ready yet, but if anyone cares to take a look, comments and thoughts are welcome: https://cljdoc.org/d/mccraigmccraig/promisefx/0.0.1.7-SNAPSHOT/doc/readme