is there any advice for speccing containers, e.g. atoms or delays?
Say you have a check!
function. I normally hook up the :validator to it, but only on *assert*
I went with an fspec instead
Most ref types have validators, I forgot about those. you could use s/assert in there
doesn’t help with generation, but there’s manual intervention for generation all the time anyway
delays however don’t have validators
> doesn’t help with generation, yeah it's a tradeoff :) > delays however don’t have validators yup, as you may know though a custom IDeref impl can be quite thin
I’d like to say “takes a delay that returns a thing satisfying some predicate when derefed”
@favila There's no way to do that. You can spec around the code that processes what's inside the container, but you can't spec the container itself.
atoms do have validator functions that you can pass in on instantiation I think?
they do
but carefully consider the costs there