[EMAIL PROTECTED]

wrote something on the possible generic function for the mean 
value (I had lost the letter)

> real2frac ... fromRational . toRational  ....


But will this do:

-----------------------------------------------------------------
mean :: (Num a, Num b, Fractional b) => (a -> b) -> [a] -> b

mean  convert xs =  (convert (sum xs)) / fromIntegral (length xs)
-----------------------------------------------------------------

- ?
Looks like very generic. For example:  
                          imean :: [Int] -> Double
                          imean    xs    =  mean fromIntegral xs   

                          dmean :: [Double] -> Double
                          dmean    xs       =  mean id xs   

------------------
Sergey Mechveliani

[EMAIL PROTECTED]





Reply via email to