Skip to content

Commit 9d8053c

Browse files
committedSep 10, 2016
very minor tweaks
1 parent 4bad539 commit 9d8053c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎bk1ch02p047anonymousFunctions/bk1ch02p047anonymousFunctions/ViewController.swift

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ func doThis(f:()->()) {
66
f()
77
}
88

9-
func sayHowdy() -> String {
9+
func greeting() -> String {
1010
return "Howdy"
1111
}
1212
func performAndPrint(_ f:()->String) {
@@ -37,8 +37,10 @@ class ViewController: UIViewController {
3737
super.viewDidLoad()
3838

3939
let image = imageOfSize(CGSize(width:45, height:20), {
40+
() -> () in // included deliberately for book example
4041
let p = UIBezierPath(
41-
roundedRect: CGRect(x:0,y:0,width:45,height:20), cornerRadius: 8)
42+
roundedRect: CGRect(x:0,y:0,width:45,height:20),
43+
cornerRadius: 8)
4244
p.stroke()
4345
})
4446

@@ -53,7 +55,7 @@ class ViewController: UIViewController {
5355
}
5456

5557
performAndPrint {
56-
sayHowdy() // meaning: return sayHowdy()
58+
greeting() // meaning: return greeting()
5759
}
5860

5961
let arr = [2, 4, 6, 8]

0 commit comments

Comments
 (0)