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 with multiple parameters in Swift
Submitted by
obraztsov
on Mon, 11/09/2015 - 11:51
Forums:
Swift: Closures (lambda expressions)
let
avgFunc = { (a, b)
in
(a + b) /
2
}
let
avg = avgFunc(
3
,
5
)
//avg is 4
Log in
to post comments