Re: [racket-users] Function contract that cares only about the return value?

2017-06-13 Thread David Storrs
Dangit, how did I miss that? I fail reading comprehension forever. Thanks, guys. On Tue, Jun 13, 2017 at 11:26 AM, Ben Greenman wrote: > unconstrained-domain-> > > http://docs.racket-lang.org/reference/function-contracts. >

[racket-users] Function contract that cares only about the return value?

2017-06-13 Thread David Storrs
Suppose the following trivial function: (define/contract (foo func) (-> (-> any/c ... any/c) #t) #t) This is trying (and failing) to express the idea "foo takes a processor function. I don't care what arguments the processor requires (that's the caller's job) but the processor must return a

Re: [racket-users] Function contract that cares only about the return value?

2017-06-13 Thread Sam Tobin-Hochstadt
I think you want the `unconstrained-domain->` contract. Sam On Tue, Jun 13, 2017 at 11:24 AM, David Storrs wrote: > Suppose the following trivial function: > > (define/contract (foo func) > (-> (-> any/c ... any/c) #t) > #t) > > This is trying (and failing) to

Re: [racket-users] Function contract that cares only about the return value?

2017-06-13 Thread Ben Greenman
unconstrained-domain-> http://docs.racket-lang.org/reference/function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._unconstrained-domain-~3e%29%29 On Tue, Jun 13, 2017 at 11:24 AM, David Storrs wrote: > Suppose the following trivial function: > >