Skip to main content
Code sample in Swift, C# and Java
Main menu
About
History
Swift
C#
Java
Python
You are here
Home
»
Forums
»
Swift
»
Swift: Closures (lambda expressions)
Closures without any return value in Swift
Submitted by
obraztsov
on Mon, 11/09/2015 - 12:03
Forums:
Swift: Closures (lambda expressions)
let
add2AndPrint = { a
in
print
(a +
2
) }
add2AndPrint(
5
)
//printed 7
Log in
to post comments