Hi everyone, I wanna spec sth like this :
[[:__ :TXC :BTC :ALT :PAXG ]
[:TT1 0M 0M 0M 0M ]
[:TT2 0M 0M 0M 0M ]
[:TT3 0M 0M 0M 0M ]
[:TT4 0M 0M 0M 0M ]
[:Others 0M 0M 0M 0M ]
]
but the following spec won't work :
(spec/def ::X-Header-Row (spec/cat :dont-care #{:__} :exposure-id-s (spec/+ ::Exposure-ID)))
(spec/def ::X-Row (spec/cat :g-id ::Group-ID :weights (spec/+ decimal?)))
(spec/def ::X (spec/cat :header ::X-Header-Row :rows (spec/+ ::X-Row)))
What is it that I'm not getting about how spec/cat works and how can I spec that table ?
Thanks a lot in advanceThanks a lot, Alex
won't work .... because?
regex ops combine to spec one collection, so you need to do something to separate the outer collection and the inner collection "levels"
probably the shortest path to that is to wrap s/spec around the X-Row cat