Prelude> -- I have 2 functions: f and g
Prelude> f x y = x + y
Prelude> g x = 2*x
Prelude> f 2 3
5
To express $ f(x, g(y))*
with x=2 and y=3 this work well:
Prelude> f 2 (g 3)
8
why does the following return error ?
Prelude>
Prelude> f 2 g 3
<interactive>:19:1: error:
• Non type-variable argument in the constraint: Num (a -> a)
(Use FlexibleContexts to permit this)
• When checking the inferred type
it :: forall a. (Num a, Num (a -> a)) => a
Prelude>