From: Rob Pike Date: Mon, 1 Apr 2013 22:52:15 +0000 (-0700) Subject: doc/codewalk/markov: fix slice error in description X-Git-Tag: go1.1rc2~234 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b91ae5c27c3b21e8364a7dec732d7885ce6a2073;p=gostls13.git doc/codewalk/markov: fix slice error in description Fixes #5176. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/8118046 --- diff --git a/doc/codewalk/markov.xml b/doc/codewalk/markov.xml index 7f12818177..76c448ac32 100644 --- a/doc/codewalk/markov.xml +++ b/doc/codewalk/markov.xml @@ -181,7 +181,7 @@ p == Prefix{"am", "not"} one index to the left (if you consider zero as the leftmost index).
 p := Prefix{"I", "am"}
-copy(p, p[:1])
+copy(p, p[1:])
 // p == Prefix{"am", "am"}
We then assign the provided word to the last index of the slice: