eval / malli-select

spec2-inspired selection of Malli-schemas
MIT License
32 stars 0 forks source link

selector #3

Closed eval closed 12 months ago

eval commented 1 year ago

Currently select-ing from a schema will optionalize all and then require the paths from the selection.
Typically you'd select a lot from one schema to get the right subschema for a context. The 'optionalize all'-step is therefor kinda wasteful (and quite pricey) and could be done once with a selector:

(def person-selector (selector Person)) ;; ~2/3 the cost of a select

((person-selector) [,,,]) ;; ~1/3 the cost of a select