On Sun, 13 Feb 2011 13:35:48 -0500 Stephen Bloch <sbl...@adelphi.edu> wrote:
> > On Feb 13, 2011, at 12:16 PM, Eli Barzilay wrote: > > >>> the `=>' is going to be required > > -or- there's a single expression to test for a non-#f result, and > > you'll use a nested `test' expression for those non-#f things. This > > still makes things less convenient for using random predicates, but > > not much. For example, a `fib' test suite that can currently look > > like this: > > > > (test (exact-nonnegative-integer? (fib 10)) > > (fib 10) => 55) > > > > would instead be written as: > > > > (test (test (exact-nonnegative-integer? (fib 10))) > > (fib 10) => 55) > > 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. s. _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users