함수 목록에서 순열 오류를 수정하는 방법은 무엇입니까?Haskell Data.List 순열 함수
> :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)'*하지 * 섹션 것을 잊지 마십시오,하지만 동등한'해야' – Ingo