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.
uli
04/03/2023, 5:33 PM
i don’t really understand. could you give an example in pseudo code?
uli
04/03/2023, 5:35 PM
• 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?
uli
04/03/2023, 5:36 PM
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.