[racket-users] Re: Defining contracts sanely

2015-06-27 Thread Aidan Gauland
On 23/06/15 00:00, Robby Findler wrote: On Mon, Jun 22, 2015 at 2:43 AM, Aidan Gauland: If this does what you want, it’s fine, but the define/contract is probably unnecessary, and (define fish-freshness/c (flat-named-contract ‘fish-freshness/c (lambda (x) (not (eq? ….)

Re: [racket-users] Re: Defining contracts sanely

2015-06-27 Thread Robby Findler
On Sat, Jun 27, 2015 at 6:20 PM, Aidan Gauland aidal...@slingshot.co.nz wrote: On 23/06/15 00:00, Robby Findler wrote: On Mon, Jun 22, 2015 at 2:43 AM, Aidan Gauland: If this does what you want, it’s fine, but the define/contract is probably unnecessary, and (define fish-freshness/c

Re: [racket-users] Re: Defining contracts sanely

2015-06-22 Thread Robby Findler
On Mon, Jun 22, 2015 at 2:43 AM, Aidan Gauland aidal...@slingshot.co.nz wrote: If this does what you want, it’s fine, but the define/contract is probably unnecessary, and (define fish-freshness/c (flat-named-contract ‘fish-freshness/c (lambda (x) (not (eq? ….) Should do

[racket-users] Re: Defining contracts sanely

2015-06-22 Thread Aidan Gauland
On 22/06/15 04:26, Alexander D. Knauth wrote: On Jun 21, 2015, at 5:41 AM, Aidan Gauland wrote: Say I want to define a flat contract for the freshness field of my fish class, so I define a contract for it like so: (define/contract fish-freshness/c (- any/c boolean?)