Re: [racket-users] or/c, parametric->/c, and contract-first-order-passes?

2017-11-29 Thread Robby Findler
Maybe this line: https://github.com/racket/racket/blob/master/racket/collects/racket/contract/private/parametric.rkt#L105 should be: #:first-order (λ (c) (if (barrier-contract-positive? c) (barrier-contract-pred c) (λ (x) #t))) ? Robby On Tue, Nov 28, 2017 at 8:02 PM, Ben Greenman

[racket-users] or/c, parametric->/c, and contract-first-order-passes?

2017-11-28 Thread Ben Greenman
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: ``` #lang racket (define/contract (f v) (parametric->/c [A] (-> (or/c (vectorof A #:immutable