๐Ÿ”ฐclosure expression

Swift โŸฉ basic types โŸฉ closure โŸฉ closure expression

A closure expression creates a closure.

syntax๏ผš

{ (parameters) -> ReturnType in
    statements
}

a closure is also known as a lambda / anonymous function in other programming languages.

Last updated