Problem
When pulling data from a map, lasagna-pull requires all map keys to be provided up front. There is no way to discover all map keys or all map values. For example:
(def entity-map
{#uuid "123456" {:attr1 :v1 :attr2 :v2}
#uuid "234567" {:attr1 :v3 :attr2 :v4}})
;; There is no way to pull [#uuid "123456", #uuid "234567"] or [{:attr1 :v1}, {:attr1 :v3}].
Impact
It is difficult to work with index–entity maps in which indexes (keys) are generated dynamically, like entity-map above.
These maps are common when working with UI entities in re-frame.
Suggestion
- Implement patterns for pulling all map keys or values, similar to Specter’s
MAP-KEYS and MAP-VALS, respectively.
Problem
When pulling data from a map,
lasagna-pullrequires all map keys to be provided up front. There is no way to discover all map keys or all map values. For example:Impact
It is difficult to work with index–entity maps in which indexes (keys) are generated dynamically, like
entity-mapabove.These maps are common when working with UI entities in re-frame.
Suggestion
MAP-KEYSandMAP-VALS, respectively.