I'm new to haskell, and i'm trying to use operand .
function strangeMaths has to be smth like logBase 2 ((max x)^3) but using 3 functions and operand . so i did this code
strangeMaths = f . g . h
f = logBase 2
g = (^3)
h = max
but this gives me an error:
No instance for (Ord a0) arising from a use of `max'
The type variable `a0' is ambiguous
Relevant bindings include
h :: a0 -> a0 -> a0 (bound at 14)doItYourSelf.hs:7:1)
Note: there are several potential instances:
instance Integral a => Ord (GHC.Real.Ratio a)
-- Defined in `GHC.Real'
instance Ord () -- Defined in `GHC.Classes'
instance (Ord a, Ord b) => Ord (a, b) -- Defined in `GHC.Classes'
...plus 23 others
In the expression: max
In an equation for `h': h = max
Failed, modules loaded: none.
P.S. i know that log (a, b^c) = c*log (a, b) but this is an example.