|
|
|
|
|
by jmillikin
1177 days ago
|
|
I think the author wants something like Ruby's blocks, although you're correct that monads would also be a good fit. In Ruby, iteration can be performed by passing a sort-of-closure called a block. Unlike passing a closure (function), returning early from a block acts like returning from a for loop. If a language has a garbage collector and no user-visible separation between stack and heap allocation, then there's lots of interesting things that language can do in terms of building "fluent" APIs. |
|