diff options
author | Pete Hamilton <peterejhamilton@gmail.com> | 2014-07-05 12:03:09 +0100 |
---|---|---|
committer | Pete Hamilton <peterejhamilton@gmail.com> | 2014-07-05 12:03:09 +0100 |
commit | 4c3409670319e4a450a5e0f8e4b9669e73792326 (patch) | |
tree | fa9bfde4dffcb28502547c190520575222c5ec03 | |
parent | 25102363d8053155f14892bdf690a7e71281204a (diff) |
Remove duplication of function factory example
-rw-r--r-- | go.html.markdown | 7 |
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.") |