> -----Original Message-----
> From: Matthias Kilian [mailto:[EMAIL PROTECTED]]
> Sent: 06 August 2000 22:01
> To: Mirko Pracht
> Cc: [EMAIL PROTECTED]
> Subject: Re: 
> 
> 
> On Sun, 6 Aug 2000, Mirko Pracht wrote:
> 
> > average x      | null x    = 0.0
> 
> What does you make thinking the average of an empty list is 0? Its'
> obviously _|_, thus
> 
> average xs = sum xs / length xs

does this not need a "fromInt" to keep it happy
I seem to remember a function genericLength once upon
a type ... has this been removed nowadays?


> 
> [which is inefficient, but simple]
> 
> Kili
> 
> -- 
> _|_ is pronounced 'bottom', and is the greatest lower bound of a
> complete lattice.
> 
> Nick Williams in comp.lang.functional
> 
> 

Reply via email to