[racket] Looking for feedback on code style

From: Noel Welsh (noelwelsh at gmail.com)
Date: Thu Sep 9 09:24:06 EDT 2010

On Thu, Sep 9, 2010 at 1:09 PM, David Van Horn <dvanhorn at ccs.neu.edu> wrote:
> What!?

What can I say -- I have low standards.

> Without a purpose statement, contract, or examples, it's difficult to know
> what this code is supposed to do, much less say if it is doing whatever it
> is supposed to do correctly.

'round these parts the term 'median' has widely accepted usage. It is
pretty obvious that the given function was intended to compute this
median and further more how it was going about doing so. For
production code I'd want some tests (which would have caught the
errors you noted) and a contract. I'm not too hung up on a purpose
statement for something so simple. But the question was about the
style and structure of the code as given, for which I responding that
it is indeed idiomatic and clear.


Posted on the users mailing list.