Created
October 31, 2019 14:11
-
-
Save souenzzo/d4efd1d58515679fb51761c2e1ae350d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [atributo->item {:a {:atributo :a | |
:selecionado? true} | |
:b {:atributo :b | |
:selecionado? false} | |
:c {:atributo :c}}] | |
{:reduce (reduce-kv (fn [acc k {:keys [selecionado?]}] | |
(if (false? selecionado?) | |
acc | |
(conj acc k))) | |
#{} | |
atributo->item) | |
:for (set (for [[k {:keys [selecionado?]}] atributo->item | |
:when (not (false? selecionado?))] | |
k)) | |
:xf (into #{} | |
(comp (remove (comp false? :selecionado? val)) | |
(map key)) | |
atributo->item)}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment