【发布时间】:2010-08-04 14:05:50
【问题描述】:
在 GHCi 中:
- 前奏曲> (+3) 2
5- 前奏曲> (*3) 2
6- 前奏曲> (/3) 2
0.6666666666666666- 前奏曲> (-3) 2
(Num (t -> t1)) 没有实例
源于文字3' at <interactive>:1:2it': it = (- 3) 2
Possible fix: add an instance declaration for (Num (t -> t1))
In the expression: 3
In the expression: (- 3) 2
In the definition of
如何更正最后一个以使其返回 -1?
【问题讨论】:
标签: haskell ghci unary-operator prefix-operator