On Feb 25, 2013, at 11:33 AM, Eli Barzilay wrote: > A few minutes ago, Danny Yoo wrote: >> Yup; I've been doing so a little bit, fixing up some of the code >> snippets so they work on sequences rather than just on lists, and >> using "raise-argument-error" in favor of just plain error, since the >> error messages are better. For example: >> >> http://rosettacode.org/wiki/Dot_product#Racket >> http://rosettacode.org/wiki/A%2BB#Racket > > Two comments: > > * IMO having complete #lang-ed files is much better, since people get > a working template file rather than a repl demonstration. > > * -1 for the pedantics of errors etc in the second example -- I think > that the main goal of these things is for quick impressions, and for > that second example, a half-line > > (+ (read) (read)) > > is *much* better-looking. For extras like error checking, I'd defer > them for an additional extended example with more stuff in. (But in > the case of error checking, I'd probably still skip it.)
Any general opinion on the value of test cases? I did a quick copy of gcd this morning, and I couldn't decide whether the test cases made it look more helpful or just verbose. John
smime.p7s
Description: S/MIME cryptographic signature
____________________ Racket Users list: http://lists.racket-lang.org/users

