[Haskell-cafe] A functional programming solution for Mr and Mrs Hollingberry
ok at cs.otago.ac.nz
Mon May 28 04:07:09 CEST 2012
On 26/05/2012, at 4:16 AM, David Turner wrote:
> I don't. I think the trouble is that classes don't add value in exercises of this size.
This was the key point, I think.
In this example, there wasn't any significant behaviour that could be moved
to superclasses. For that matter, whether a supplier is plain, preferred,
or problematic is, one hopes, not a *permanent* property of a supplier.
Sometimes higher-order functions can substitute for classes.
More information about the Haskell-Cafe