I was trying to create a map like Kayleen Wheeler did in another thread.
The particular usecase is a user specified configuration map for component
systems. It's the second argument to this
fn https://github.com/funzt/component.config/blob/master/src/funzt/component/config.cljc#L10
The docstring says "Keys with the namespace \"setup\" are reserved options",
of which the lib currently uses one. So the best case would be sth. like
(t/U (t/Map (t/Difference t/All (t/KeywordWithNs "setup")) t/All) (t/HMap
:optional {:setup/disabled (t/Set t/Any)} :complete? true))
Obviously t/KeywordWithNs doesn't exist, so I thought I could at least try
sth. like
(t/U (t/Map (t/Difference t/All (t/Value :setup/disabled)) t/All) (t/HMap
:optional {:setup/disabled (t/Set t/Any)} :complete? true))
Kind regards,
Leon.
On Monday, April 11, 2016 at 11:44:25 PM UTC+2, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-SergeantHi Leon,
Difference is half-baked at the moment. Is there a particular use-case
you're thinking of?
I added Difference to try and eliminate negation types, but I don't know
if that justifies its existence in hindsight.
eg. (I Any (Not (t/Value :foo)))
Thanks,
Ambrose
Post by Leon GrapenthinAre there plans to support arbitrary differences?
I. e. (t/Difference t/Any (t/Value :foo))