1
0
mirror of https://github.com/golang/go synced 2024-11-25 09:17:57 -07:00

doc/codewalk/markov: fix slice error in description

Fixes #5176.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8118046
This commit is contained in:
Rob Pike 2013-04-01 15:52:15 -07:00
parent 144dd2b21c
commit b91ae5c27c

View File

@ -181,7 +181,7 @@ p == Prefix{"am", "not"}</pre>
one index to the left (if you consider zero as the leftmost index).
<pre>
p := Prefix{"I", "am"}
copy(p, p[:1])
copy(p, p[1:])
// p == Prefix{"am", "am"}</pre>
We then assign the provided <code>word</code> to the last index
of the slice: