Rob Elliot
03/30/2022, 10:09 AMfun <A, B, R> ((A, B ) -> R).curry(a: A): (B ) -> R = { b: B -> this(a, b ) }
fun <A, B, C, R> ((A, B, C) -> R).curry(a: A): (B, C) -> R = { b: B, c: C -> this(a, b, c) }
Do they already exist in the stdlib? Or are they a bit too Haskelly for Kotlin?Klitos Kyriacou
03/30/2022, 10:20 AMbind
instead of curry
) - see e.g. https://stackoverflow.com/a/6610165/13963086marstran
03/30/2022, 10:59 AMcurried
and uncurried
: https://arrow-kt.io/docs/apidocs/arrow-core/arrow.core/index.html#functionsRob Elliot
03/30/2022, 11:00 AMephemient
03/30/2022, 9:27 PM