Demo entry 6314807

Kotlin Curry Function

   

Submitted by Bill Davis on Oct 29, 2016 at 16:33
Language: Kotlin. Code size: 183 Bytes.

fun <A,B,C> curry(function: (A,B) -> C): (A) -> (B) -> C {
    return fun (a: A): (B) -> C {
        return fun (b: B): C {
            return function(a, b)
        }
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).