Introduction_to_Haskell icon indicating copy to clipboard operation
Introduction_to_Haskell copied to clipboard

发现的书中一些错误

Open eccstartup opened this issue 11 years ago • 2 comments

  1. pp81, 第二段代码, 结果多了一个逗号

  2. pp92, 最后一段代码,[1..] 应该改为[1,1..]

  3. pp126, 最后一部分,>>全部应该是>>>

  4. pp128, 练习,应该有一个(.).(.)出现在map map前面

  5. pp159, 8.10简vd单中混进了几个字母

  6. pp203, 底下代码Just (x+y)应为Just (n1+n2)

    --snowXman

eccstartup avatar Mar 15 '14 13:03 eccstartup

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

谢谢

freizl avatar Jun 05 '14 23:06 freizl

谢谢,已经在勘误表上改正。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.

HaskellZhangSong avatar Jun 19 '14 10:06 HaskellZhangSong