[racket] member et al.
On Wed, Nov 10, 2010 at 9:29 PM, Mark Engelberg
<mark.engelberg at gmail.com> wrote:
> Racket still offers several primitives, such as member, that are
> primarily used as predicates, but don't actually return a Boolean.
> Racket's cond handles any of these return values as true, but now that
> Racket is gravitating towards contracts and typed modules, shouldn't
> Racket's predicates actually return true or false?
No. There's no reason that contracts or types need to have any
trouble with Racket's generalized booleans. In particular, the Typed
Racket type system is designed to cope with exactly these sorts of
idioms.
--
sam th
samth at ccs.neu.edu