https://kotlinlang.org logo
Title
s

Slackbot

03/31/2023, 3:19 PM
This message was deleted.
u

uli

04/01/2023, 10:59 AM
As
block
is an extension on
ActorScope
i’d expect it to have access to
channel
. Have not checked though.
To actually call it from
myFunction
you need to make
myFunction
an extension on
ActorScope
as well
You only need the actorScope when calling the effect, not when defining it. I'd expect
effect
to be called from the message handling loop. There you have the actorScope already in scope.
i don’t really understand. could you give an example in pseudo code?
• how does the higher order function get the message from the inbox? • is it relevant that this higher order function if from another class? • do you want to pass the higher order function to a second kotlin class through the constructor? or every time?
Maybe it also helps if you try to describe the actual problem at hand. What underlying task are you trying to solve? most helpful if you give the real task and not try to abstract it.