From b91ae5c27c3b21e8364a7dec732d7885ce6a2073 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Mon, 1 Apr 2013 15:52:15 -0700 Subject: [PATCH] doc/codewalk/markov: fix slice error in description Fixes #5176. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/8118046 --- doc/codewalk/markov.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/codewalk/markov.xml b/doc/codewalk/markov.xml index 7f128181775..76c448ac32a 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: