Partial function application: Difference between revisions
m
→{{header|Kotlin}}: Inserted space before equals sign
(Added Kotlin) |
m (→{{header|Kotlin}}: Inserted space before equals sign) |
||
Line 1,048:
fun fs(f: Func, seq: List<Int>) = seq.map { f(it) }
fun partial(fs: FuncS, f: Func) = { seq: List<Int> -> fs(f, seq) }
fun f1(n: Int) = 2 * n
|