Fork me on GitHub
#specter
<
2016-11-10
>
tianshu01:11:17

@nathanmarz Thanks for the help. It's very useful!

fredokun09:11:59

Hi there. Lately, I pretty much enjoy writing specter one-liners, neat!

fredokun09:11:42

I have a probably numb question but is it possible in (transform PATH f val) to make the transformation somewhat depend on the application of val. I give an example (on which I stumbled multiple times)... Consider a map like this: `

fredokun09:11:45

{ :a 2 :b 1 :c 3}
And I would like to e.g. decrement all VALS and, at the same time, remove all the pairs whose value gets to 0, i.e. : `

fredokun09:11:35

(sorry for the very bad slack edits, I'm new here ;-)... So I would like to obtain : { :a 1 :c 3} and :b is no more ... Thanks in advance (and sorry again for the awfully bad typing above).

fredokun09:11:35

(plus I see that it's the middle of the night in the U.S. and no one's here ;-). See you later then !

fredokun12:11:32

(oops) To rephrase myself: is it possible in (transform PATH f val) to make the transformation somewhat depend on the application of f ?

nathanmarz12:11:28

you could always make that navigator yourself

nathanmarz12:11:00

keypath, MAP-VALS, and ALL could have that functionality

fredokun17:11:00

thanks for the reply I will look at the issue and try to do something !

zane18:11:19

I wish specs were … Specter-aware, if that makes sense.

zane18:11:53

Haven't completely thought this through.

zane18:11:09

But it would be nice to be able to use Specter selectors in specs rather than traditional keypaths.