Four hours ago, Stefan Schmiedl wrote: > On Sun, 13 Feb 2011 13:35:48 -0500 > Stephen Bloch <sbl...@adelphi.edu> wrote: > > > How is this an improvement on > > (test (exact-nonnegative-integer? (fib 10)) => #t > > (fib 10) => 55) > > which doesn't require any special cases at all? > > +1 on that. > > (test > (foo) => #t > (bar) => 'baz) > > would be very easy to type and quick to read and also force you to > make explicit if you expect something specific or just anything > not-#f.
It makes sense to test for non-#f-ness since you might test using more than plain predicates. For example: (test (member 'x (union '(x y z) '())) => ???) And even ignoring the argument about `member' vs a `member?', the bottom line is that the test of "non-#f" is very common -- so I really don't want to force people to write some verbose (test (and E #t) => #t) or (test (not (not E)) => #t) or even (test (true? E) => #t) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users