summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2014-07-06 11:11:48 -0500
committerLevi Bostian <levi.bostian@gmail.com>2014-07-06 11:11:48 -0500
commitd906122f69fa3b5165e418569c1ea63ed1c54c80 (patch)
treefa9bfde4dffcb28502547c190520575222c5ec03
parent25102363d8053155f14892bdf690a7e71281204a (diff)
parent4c3409670319e4a450a5e0f8e4b9669e73792326 (diff)
Merge pull request #664 from petehamilton/patch-1
Remove duplication of function factory example
-rw-r--r--go.html.markdown7
1 files changed, 0 insertions, 7 deletions
diff --git a/go.html.markdown b/go.html.markdown
index 03227676..4ea6861b 100644
--- a/go.html.markdown
+++ b/go.html.markdown
@@ -214,13 +214,6 @@ func sentenceFactory(mystring string) func(before, after string) string {
}
}
-// Next two are equivalent, with second being more practical
-fmt.Println(learnFunctionFactory("summer")("A beautiful", "day!"))
-
-d := learnFunctionFactory("summer")
-fmt.Println(d("A beautiful", "day!"))
-fmt.Println(d("A lazy", "afternoon!"))
-
func learnDefer() (ok bool) {
// Deferred statements are executed just before the function returns.
defer fmt.Println("deferred statements execute in reverse (LIFO) order.")