I try a dummy example of using composition with lambda expression. The below code compile, but it doesn't run when I try (f.g) 3 2
f x = x^2
g x = 5*x
f.g = \x -> f(g x)
It gives such an error:
Ambiguous occurrence `.'
It could refer to
either `Prelude..',
imported from `Prelude' at list3.hs:1:1
(and originally defined in `GHC.Base')
or `Main..', defined at list3.hs:42:3.
Can somebody please tell me where is the problem?