In GHCi:
- Prelude> (+3) 2
5
- Prelude> (*3) 2
6
- Prelude> (/3) 2
0.6666666666666666
- Prelude> (-3) 2
No instance for (Num (t -> t1))
arising from the literal 3' at <interactive>:1:2
Possible fix: add an instance declaration for (Num (t -> t1))
In the expression: 3
In the expression: (- 3) 2
In the definition of
it': it = (- 3) 2
How can I correct the last one to make it return -1?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…