Now, I could do something like: `constructor(varar...
# announcements
s
Now, I could do something like:
constructor(vararg cells: Cell, f: (List<T>) -> T)
but then the lambdas would go from
{ x, y -> x + y }
to something like
{ it[0] + it[1] }
which I guess would be ok, but not the most readable.
m
sdavids: In Kotlin 1.1 you can use destructuring in lambdas so that with
constructor(vararg cells: Cell, f: (List<T>) -> T)
you can write
{ (x, y) -> x + y}
. One caveat to this is that it will be up to the call-point to destructure the right number of params.