I am running into some conceptual confusion about bcom
that I wanted to document here as part of my process towards understanding Goblins.
It took me a while to realize that bcom
can only be called at a tail position, as I eventually discovered a sentence mentioning it here. bcom
also does not seem to work when made the tail of a promise callback. It would probably be helpful to have an error message if bcom
is invoked in such an invalid situation.
It was helpful to use the second argument to bcom
which I luckily also noticed on that page, but it was non-obvious and by default I expected to be able to call bcom
, then return a value.
Is there any way to trigger the use of bcom
after receving info from a promise callback? I am currently struggling with two objects which I want to both bcom
something else, one triggered by the others’ change. Essentially, I want to ask the second object for some info, then bcom
my second type of actor upon receiving the result in the callback. This seems like a simple operation so it is surprising to me how difficult it has been to conceptualize properly.