大久保弘崇
Errata-7
最終更新:
hirotakaohkubo
-
view
Chapter 13
At first I propose a function sortPerm,
which computes the permutation that sorts given list.
which computes the permutation that sorts given list.
This function increses modularity and makes unstable sort stable.
p.92 l.-2
should be
p.99 l.-10
Wrong:
Correct:
Correct:
p.100 l.13
Wrong:
Corrent:
Corrent:
p.100
Discussion here about rots and tails . tag is incorrect.
Whichever EOF is larger or smaller, equation
Whichever EOF is larger or smaller, equation
cannot establish.
Counterexample:
Compute
and
Compute
| xs | rots | EOF=0 | EOF=3 |
| [1,2,2,2,2] | [0,4,3,2,1] | [0,4,3,2,1] | [0,1,2,3,4] |
| [2,1,1,1,1] | [1,2,3,4,0] | [4,3,2,1,0] | [1,2,3,4,0] |
p.101 l.4, l.5 def of transform
Wrong:
Correct:
Correct:
Wrong: n = length ys
Correct: n = length xs
Correct: n = length xs
My proposal
The definition of apply(p.97 l.9), it is sufficient
So, in the final version of transform (p.101)
and array pa not needed, but to compute ps, we cannot use "Ranking suffixes"