From 4c3409670319e4a450a5e0f8e4b9669e73792326 Mon Sep 17 00:00:00 2001 From: Pete Hamilton Date: Sat, 5 Jul 2014 12:03:09 +0100 Subject: Remove duplication of function factory example --- go.html.markdown | 7 ------- 1 file changed, 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.") -- cgit v1.2.3