Day 6 of #100DaysOfSwift done. Closures: Part One. Surprised it’s a compiler error when you pass in an argument label to a closure with an argument name. Instead of a(b: 42) it should be a(42).
var a = { (b: Int) in print(”(b)“) } a(b: 42)
Day 6 of #100DaysOfSwift done. Closures: Part One. Surprised it’s a compiler error when you pass in an argument label to a closure with an argument name. Instead of a(b: 42) it should be a(42).
var a = { (b: Int) in print(”(b)“) } a(b: 42)