On Mon, Sep 10, 2018 at 2:18 PM, Alexis King wrote:
> I think the answer here really is “don’t use `contract` directly”. The
> actual implementation of the contract system does some fancy rebinding
> of my-func when you use define/contract, turning this:
>
>(define/contract x ctc rhs)
>
> int
I think the answer here really is “don’t use `contract` directly”. The
actual implementation of the contract system does some fancy rebinding
of my-func when you use define/contract, turning this:
(define/contract x ctc rhs)
into this:
(define x-awaiting-neg
(let ([tmp rhs])
(l
(define (my-func thunk-arg)
(contract integer? (thunk-arg) 'my-func ))
What should I replace with?
NB: I know that in the example I could do
(define/contract (my-func thunk-arg) (-> (-> integer?) integer?)
(thunk-arg))
but I'm looking for an answer to the generic case.
--
You receiv
3 matches
Mail list logo