Created
June 25, 2019 14:47
-
-
Save deda9/dc78ec83c64dccbfd2a8d37baeea40a0 to your computer and use it in GitHub Desktop.
How to create nested function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let multiply: (Int, Int) -> Int = { $0 * $1 } | |
let divide: (Int, Int) -> Int = { $0 / $1 } | |
let minus: (Int, Int) -> Int = { $0 - $1 } | |
minus(multiply(divide(10,2), 2), 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment