Higher-order Function & Lambda
1. Higher-order function là gì ?
Thuật ngữ "Functional programming" là một dạng lập trình mà ta có thể truyền các hàm như 1 tham số hay return 1 hàm , Higher-order function
là một dạng như vậy
Dưới đây là hai kiểu thể hiện cơ bản của Higher-order function :
1. Higher-order function được truyền như tham số
Ta có ví dụ một Higher-order function như sau :
fun printPerson(name: String , printName: (Int?) -> String) {
...
android kotlin
May Fest
2643