Hi! I started playing with Arrow and context rece...
# arrow
j
Hi! I started playing with Arrow and context receivers. The code below works as expected.
Now, why's the context expected to be a parameter to the function instead of being... well, a context?
I'd expect it to be this (which doesn't compile):
this way it works:
Now, why's the context expected to be a parameter to the function instead of being... well, a context?
sorry, @franztesca, I'm not following 😕
f
Sorry I misread the code and wrote not relavant stuff 😄 My guess is that context receivers are not implemented fully and they should work as you point out but it's not a covered use case yet. I think this is not related to Arrow strictly, you may want to ask in another channel
👍 1
j
Makes sense! Thanks for confirming.
r
Passing contexts is desugared into normal function parameters by the compiler. This is why the above with the context as parameter is valid code. Same goes for extension functions.
j