]> Cypherpunks repositories - gostls13.git/commitdiff
doc: fix typo in Effective Go
authorAndrew Gerrand <adg@golang.org>
Sun, 31 Jul 2011 22:25:26 +0000 (15:25 -0700)
committerAndrew Gerrand <adg@golang.org>
Sun, 31 Jul 2011 22:25:26 +0000 (15:25 -0700)
Fixes #2120.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4810061

doc/effective_go.html

index 296939e0dfd2537572b1cf740a74bd8d28238b0f..ab109280f6e4951d71630cfbc72a065583e4bbee 100644 (file)
@@ -2730,7 +2730,7 @@ suppresses the usual check for a <code>return</code> statement.
 <pre>
 // A toy implementation of cube root using Newton's method.
 func CubeRoot(x float64) float64 {
-    z := x/3   // Arbitrary intitial value
+    z := x/3   // Arbitrary initial value
     for i := 0; i &lt; 1e6; i++ {
         prevz := z
         z -= (z*z*z-x) / (3*z*z)