You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The contract in the documentation isn't precise enough. What ~t really does is ask each of the atomic patterns what their contracts are and then enforces the conjunction of them all. Or, to put it plainly: if you include time patterns, like hour-of-day, in your pattern, then it will require that the temporal object be a time-provider. If you use date patterns, like year, it will require that the temporal object be a date-provider. If you use both, it needs to be both.
I should definitely discuss this in the documentation. I could use suggestions on how to state the (formal) contract, though.
Maybe I just shouldn't have used a single function for all of these cases.
The documentation for
(~t)
states that the contract is:(or/c time-provider? date-provider?)
but on passing it a date there is a contract violation:
The text was updated successfully, but these errors were encountered: