Comment by lioeters
19 days ago
Right.. So not only all data structures and operators, but all kinds of control flow can be described as functions. What an interesting way to look at programs, I'll study more in this direction.
I wonder how languages support this question of "unevaluated arguments", like in the `if` conditional function. I guess in Lisp(s) they're simply quoted expressions, and in the above Smalltalk example, it sounds like the syntax [...] calls a function with lazily evaluated arguments.
I think that's right. The "closure" is a function, it is not called until method #ifTrue: of the boolean value in question gets it as argument. But it is not just "a function", it is a "closure" meaning it carries with it values from its outer scope that were there at the time the #ifTrue: -method was called, which includes arguments to the outer method being called.