Fork me on GitHub
#specter
<
2018-08-29
>
nathanmarz05:08:31

@jlle ALL on maps during transform navigates to vectors for map entries

nathanmarz05:08:07

replace map? and map-entry? lines with coll? to fix it

jose11:08:22

@nathanmarz that was the piece I was missing, thanks for the info

jose11:08:29

My transformation is a bit more complex, what I'm trying to do is to transform all the string to keywords, except for the map values where the map key matches some condition. Easier to understand with an example:

jose11:08:45

which returns {:X "Y", :Z 1, :I {:X "Z"}} I found that the transformation fails in cases like this: {"X" "Y" "I" ["X" "Z"]} so I updated the transformation function to:

nathanmarz16:08:26

@jlle don't handle the map entry case separately, hande it on map? case as [ALL (if-path [FIRST (pred= "X")] FIRST ALL) p]

👍 4
jose19:08:17

right, that's a better solution, thanks a lot for the tip