Hi, is there support for partial application of `s...
# arrow
d
Hi, is there support for partial application of
suspended
functions? This does not compile:
Copy code
import arrow.syntax.function.invoke

suspend fun add(one: Int, two: Int) = one + two

suspend fun addOne(value: Int) = (::add)(p1 = 1)

suspend fun addTwo(value: Int) = (::add).partially1(2)
p
Damn, good catch. No, I don't believe we have. I'll put a ticket.
r
We need to address this as a compiler plugin because the alternative is to have n repeated arities for regular and suspend functions.
p
agreed, we have the ticket to track it 😄
This can be done with type proofs so it’s an automatic global api for all functions by proving proof of the paths between different function types as I’m doing with Unions in the new prelude.
d
Any hint for short term solution? Just make a copy of file?
p
yep
d
OK, thanks