Commit b91ae5c2 authored by Rob Pike's avatar Rob Pike

doc/codewalk/markov: fix slice error in description

Fixes #5176.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8118046
parent 144dd2b2
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment