Introduction_to_Haskell
Introduction_to_Haskell copied to clipboard
发现的书中一些错误
-
pp81, 第二段代码, 结果多了一个逗号
-
pp92, 最后一段代码,
[1..]应该改为[1,1..] -
pp126, 最后一部分,
>>全部应该是>>> -
pp128, 练习,应该有一个
(.).(.)出现在map map前面 -
pp159, 8.10
简vd单中混进了几个字母 -
pp203, 底下代码
Just (x+y)应为Just (n1+n2)--snowXman
P18
- 程序
x := x - 1对吗? 常规不是写成x = x - 1么? 这里问题不大 P21 - Section 2.2.3 shall be
Enum我会改好 P90这里不知道为什么会错。 msort应该这样子才run的过
msort :: Ord a => [a] -> [a]
msort [] = []
msort [x] = [x]
msort xs = merge (msort x1) (msort x2)
where (x1, x2) = halve xs
halve xs = (take l xs, drop l xs)
l = (length xs) `div` 2
谢谢
谢谢,已经在勘误表上改正。x := 这里强调是赋值。
Date: Thu, 5 Jun 2014 16:42:11 -0700 From: [email protected] To: [email protected] Subject: Re: [Introduction_to_Haskell] 发现的书中一些错误 (#1)
P18, 程序 x := x - 1 对吗? 常规不是写成 x = x - 1 么?
— Reply to this email directly or view it on GitHub.