From 519725bb3c075ee2462c929f5997cb068e18466a Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Mon, 26 Mar 2012 16:50:58 +0200 Subject: Imported Upstream version 2012.03.22 --- doc/codewalk/markov.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'doc/codewalk') diff --git a/doc/codewalk/markov.xml b/doc/codewalk/markov.xml index 81df1289c..085ead7bc 100644 --- a/doc/codewalk/markov.xml +++ b/doc/codewalk/markov.xml @@ -155,7 +155,7 @@ Prefix Map key

For more information about the append function and slices in general see the - Slices: usage and internals article. + Slices: usage and internals article. @@ -275,16 +275,15 @@ p[len(p)-1] = suffix - To use this program, first compile and link it. - If you are using 6g as your compiler, the command - would look something like this: + To use this program, first build it with the + go command:
-$ 6g markov.go && 6l -o markov markov.6
+$ go build markov.go And then execute it while piping in some input text:
-$ echo "a man a plan a canal panama" | ./markov -prefix=1
-a plan a man a plan a canal panama
-	
+$ echo "a man a plan a canal panama" \ + | ./markov -prefix=1 +a plan a man a plan a canal panama Here's a transcript of generating some text using the Go distribution's README file as source material:
-- 
cgit v1.2.3