The other day, I wanted to write a contract for a function that takes
any kind of vector and does something depending on whether the vector
is mutable. The contract was basically the one below:
(define/contract (f v)
(-> (or/c (vectorof A #:immutable #true)
(vectorof A #:immutable #false))
When I try to call this function, I get an error "none of the branches
of the or/c matched".
It looks like this error is because `contract-first-order-passes?`
returns #false if the vector I pass to `f` has any elements.
1. Could `(contract-first-order-passes? ctc val)` return `#true` if
`ctc` is from a `parametric->/c` ? (I feel like it shouldn't but I
don't know why not)
2. If not, would `or/c` be better off using a
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.