mirror of
https://github.com/golang/go
synced 2024-11-21 21:54:40 -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:
parent
144dd2b21c
commit
b91ae5c27c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user