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?)
  (flat-named-contract 'fish-freshness/c
    (lambda (x)
      (not (eq? #f (member x '(fresh frozen edible rotten)))))))

Am I barking up the wrong tree here, or is this perfectly sensible?

Regards,
Aidan Gauland

-- 
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 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to