Fork me on GitHub
#specter
<
2016-09-04
>
markaddleman11:09:49

i'm pretty new to specter. i have a map with some nils in the values. how would i create a submap of all non-nil values? eg {:a 😛, :c :d, :nil nil} => {:a 😛, :c :d}

nathanmarz12:09:26

@markaddleman at the moment with built-in navs: (into {} (traverse [ALL (selected? LAST some?)] data))

nathanmarz12:09:20

though there's consideration over extending the built-in navs to support removal as well https://github.com/nathanmarz/specter/issues/117

nathanmarz12:09:45

in which case your use case would be (setval [MAP-VALS nil?] NONE data)