Fork me on GitHub
#specter
<
2017-01-25
>
Busy escaping the comfort zone00:01:58

Hey Natan its seems that subset does not fit the bill in my case because the values that I'm replace are based on a pred

Busy escaping the comfort zone00:01:31

(tranform [:one (pred keyword?)] (fn [_] [[1 2] [3 4]]) {:one #{:two}})

Busy escaping the comfort zone00:01:45

Since my kewords are days its closed set (so subset works) but id be curious on how you can use pred to substitute values

nathanmarz03:01:04

@narkisr you would need to iterate over all the values and check the predicate against each value

nathanmarz03:01:01

ALL isn't currently implemented for sets though

nathanmarz03:01:26

you could either use a vector there instead of a set or make an ALL-SET-ELEMS navigator

nathanmarz03:01:34

(or open a pull request to extend ALL to sets)

Busy escaping the comfort zone12:01:02

Thank you Natan, ill take a look on what it takes to add support for that

nathanmarz13:01:29

@narkisr need to extend AllTransformProtocol to PersistentHashSet

nathanmarz13:01:36

@narkisr actually just realized that ALL already handles sets via the default case, it's just not optimized like the other data structures