Fork me on GitHub
#specter
<
2018-09-04
>
unbalanced00:09:48

forgive the neophyte inquiriry, I'm attempting to emulate

(update-in {} [:a :b :c] (fnil concat [])  [1 2 3])

unbalanced00:09:04

for practice I'm just trying it on one nested value

unbalanced00:09:21

(setval [:a NIL->VECTOR END] [1 2 3] {})

unbalanced00:09:53

ah I see... so the above is working it's when I'm dealing with a vector-as-a-key that it's an issue

unbalanced00:09:12

(setval [:a (must [:b :c]) NIL->VECTOR END] [1 2 3] {:a {}})

unbalanced01:09:48

current working work around... not pretty but it works

nathanmarz05:09:13

@goomba I think you want (must :b :c) or (apply must [:b :c])

unbalanced20:09:53

hmm well no luck so far but my guess is in general I'm still not a high enough level specter yet

unbalanced20:09:29

you don't happen to know @nathanmarz of any open source projects that are making good use of your library do you? Would love to see more examples

unbalanced20:09:29

I'm always getting so close to what I want to do but just always missing a piece

unbalanced20:09:37

for instance, navigating to the maximum of a set of elements

unbalanced20:09:55

(select [MAP-VALS :index MAX] {:a {:index 0} :b {:index 1}})
... I should be able to write or figure out MAX but sadly just not there yet

unbalanced20:09:04

of course that's simple enough to do with other functions but just trying to learn to think in specter haha

nathanmarz21:09:22

@goomba I don't really keep track of how specter is used by other open source projects

nathanmarz21:09:44

you can try doing a github search

unbalanced21:09:53

no problemo... working through some of your examples

nathanmarz21:09:20

MAX would have to be done with defnav

👍 8