Is there a difference between 2x and 2 * x?
Yes. 2 * xis the number 2times the variable x. 2 xis the result of applying a function created by interpreting the literal value 2( fromInteger 2) of a variable x.
2 ? , Num (t -> t1), 2 :: t -> t1, , , . , Num. , , , - .
EDIT:
, :
{-
{-
instance (Num a) => Num (a -> a) where
fromInteger n = \x -> ((fromInteger n) * x)
:
*Main> (\x -> (2 :: Int -> Int) x) 5
10
. IIRC, .. , 2 seconds * 5 hours.