Prelude> let estimates = [5,5,8,8,2,1,5,2]
Prelude> (/) <$> Just $ foldl (+) 0 estimates <*> Just . fromIntegral $ length estimates
<interactive>:54:1:
Non type-variable argument in the constraint: Fractional (Maybe r)
(Use FlexibleContexts to permit this)
When checking that ‘it’ has the inferred type
it :: forall a r.
(Fractional (Maybe r), Num a, Num (Int -> Maybe a -> r)) =>
Maybe r -> Maybe r