▲ | tonyg 4 days ago | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Is .map specialcased or do user functions accepting callbacks work the same way? Because you could do the Scott-Mogensen thing of #ifTrue:ifFalse: if so, dualizing the control-flow decision making, offering a menu of choices/continuations. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | kentonv 4 days ago | parent [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
.map() is totally special-cased. For any other function accepting a callback, the function on the server will receive an RPC stub, which, when called, makes an RPC back to the caller, calling the original version of the function. This is usually what you want, and the semantics are entirely normal. But for .map(), this would defeat the purpose, as it'd require an additional network round-trip to call the callback. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|