This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-21
Channels
- # announcements (6)
- # bangalore-clj (1)
- # beginners (46)
- # cider (21)
- # cljs-dev (30)
- # cljsjs (3)
- # clojure (131)
- # clojure-dev (20)
- # clojure-europe (2)
- # clojure-italy (12)
- # clojure-nl (11)
- # clojure-russia (4)
- # clojure-spec (55)
- # clojure-uk (57)
- # clojurebridge (1)
- # clojured (1)
- # clojurescript (55)
- # cursive (11)
- # data-science (1)
- # datomic (23)
- # duct (1)
- # emacs (1)
- # events (1)
- # figwheel-main (2)
- # fulcro (219)
- # graphql (16)
- # immutant (1)
- # jackdaw (3)
- # java (6)
- # juxt (30)
- # kaocha (8)
- # mount (3)
- # nyc (1)
- # off-topic (16)
- # pathom (48)
- # pedestal (1)
- # re-frame (71)
- # reagent (17)
- # ring-swagger (3)
- # shadow-cljs (96)
- # spacemacs (21)
- # specter (8)
- # speculative (20)
- # sql (21)
- # test-check (2)
- # tools-deps (12)
- # vim (6)
Is there some way to say STAY if SUBPATH 1 and SUBPATH 2 match
I cannot find a way to check if two subpaths are both present
to implement collecting an item if prop1 = x and prop2 = y
used multiple selected?
to accomplish that
hi I’m trying to figure out how exactly INDEXED-VALS works. Like the example . For say [0 1 2 3 4]
, I want to move say the 3 at index 3, to say the 0th or some other index. The select is clear to me, basically like map-indexed
. But I’m not quite grokking what’s happening in the setval
example.
This looks like it would do something like set all the indicies to 0. (sp/setval [sp/INDEXED-VALS sp/FIRST] 0 [0 1 2 3 4])
but say (sp/setval [sp/INDEXED-VALS sp/FIRST 2] 0 [0 1 2 3 4])
would move 2 to the front of the list. That’s obviously not how it works lol
it traverses the values in order, so it moves them all to index 0 in order, having the effect of reversing the vector
you can move just one particular value like this:
user=> (setval [INDEXED-VALS (selected? LAST (pred= 3)) FIRST] 0 [0 1 2 3 4])
[3 0 1 2 4]
but index-nav
is better for moving one value at a specific position:
user=> (setval (index-nav 3) 0 [0 1 2 3 4])
[3 0 1 2 4]