specter

Latest version: 1.1.3
unbalanced 2018-09-04T00:17:48.000100Z

forgive the neophyte inquiriry, I'm attempting to emulate

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

unbalanced 2018-09-04T00:18:04.000200Z

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

unbalanced 2018-09-04T00:18:21.000100Z

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

unbalanced 2018-09-04T00:43:53.000100Z

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

unbalanced 2018-09-04T00:44:12.000100Z

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

unbalanced 2018-09-04T01:12:48.000100Z

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

unbalanced 2018-09-04T01:13:30.000100Z

nathanmarz 2018-09-04T05:34:13.000100Z

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

unbalanced 2018-09-04T20:50:53.000100Z

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

unbalanced 2018-09-04T20:51:29.000100Z

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

unbalanced 2018-09-04T20:52:29.000100Z

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

unbalanced 2018-09-04T20:52:37.000100Z

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

unbalanced 2018-09-04T20:53:55.000100Z

(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

unbalanced 2018-09-04T20:55:04.000200Z

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

nathanmarz 2018-09-04T21:27:22.000100Z

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

nathanmarz 2018-09-04T21:27:44.000100Z

you can try doing a github search

unbalanced 2018-09-04T21:27:53.000100Z

no problemo... working through some of your examples

nathanmarz 2018-09-04T21:28:20.000100Z

MAX would have to be done with defnav

👍 2