Studying Swift grammar declaration of closure. I'm having a problem with:
let add: (Int, Int) -> Int
add = { (a: Int, b: Int) -> Int in
return a + b
}
error:
variables currently must have an initial value when entered at the top level of the REPL var add: (Int, Int) -> Int