1
我一直在寻找上帝知道多久,但不能得到这段代码的工作:哈斯克尔错误
solution n = 3/2*((n-n`mod`3)+3)
它编译,但是当我叫它,它抛出两个错误,第一个是
No instance for (Integral a0) arising from a use of `solution'
这里是我想要达到
solution 9 = 3/2* ((n-n`mod`3)+3) = 3/2 * ((9-0)+3) = 3/2 * (12) = 18