What kinds of functions are considered as “composable”?
问题 The Wikipedia article Function composition (computer science) says: Like the usual composition of functions in mathematics, the result of each function is passed as the argument of the next, and the result of the last one is the result of the whole. I have two questions about it: A composable function must have both arguments and return value? So following functions are not: def doNothing(): Unit = () def myName(): String = "My name" def eat(food:String): Unit = () Is my understanding correct