Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun startHere() {
- for (index in 0..100) {
- var addResult = calculate(10, index, { x, y ->
- x + y
- })
- ...
- }
- }
- inline fun calculate(x: Int,
- y: Int,
- equation: (x: Int, y: Int) -> Int): Int {
- // Do something
- return equation(x, y)
- }
Add Comment
Please, Sign In to add comment