Close + Over
kotlin 1.3.50, java 1.8 기준으로 작성하였습니다.
IntelliJ IDEA ultimate 이 아니니까
Higher-order functions 를 읽으면 도움이 됩니다.
Standard.kt 에는 유용한 함수들이 있는데 그 중 자주 사용하는 함수는 let, also, run, apply, with 등을 들 수 있다.
코틀린에서는 아래와 같이 정의하고 있다.
A higher-order function is a function that takes functions as parameters, or returns a function.
함수를 인자로 받거나, 함수를 반환하면 higher-order 함수이다.