How to fix the permutation error on a list of functions?
> :m + Data.List > permutations [(+1),(-2),(*3)] No instance for (Num a0) arising from a use of `+' The type variable `a0' is ambiguous Possible fix: add a type signature that fixes these type variable(s) Note: there are several potential instances: instance Num Double -- Defined in `GHC.Float' instance Num Float -- Defined in `GHC.Float' instance Integral a => Num (GHC.Real.Ratio a) -- Defined in `GHC.Real' ...plus three others In the expression: (+ 1) In the first argument of `permutations', namely `[(+ 1), (- 2), (* 3)]' In the expression: permutations [(+ 1), (- 2), (* 3)]
(-2)is not a section, but equivalent to(negate 2)