sdavids
02/09/2017, 5:44 AMconstructor(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.tauraamui
02/09/2017, 9:43 AMkoufa
02/09/2017, 1:47 PMpentarex
02/09/2017, 2:48 PMsreich
02/09/2017, 3:54 PMsksk
02/09/2017, 6:44 PMC:\Users\scellow\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\171.2822.15\plugins\Kotlin\kotlinc\bin
Eugenio
02/09/2017, 10:38 PMehonsey
02/09/2017, 11:35 PMjava.sql.Date
. Although I have an import for that class in the calling class, when I call Date.from(Instant)
the compiler is inferring java.util.Date
instead of java.sql.Date
. I had to give a type hint. I would have expected the compiler to make this inference based on the type of the target field.mfulton26
02/10/2017, 3:37 PMmartyglaubitz
02/10/2017, 3:40 PMdanneu
02/11/2017, 6:00 AMfun <T> Iterable<T>.batch(chunkSize: Int) = this
.mapIndexed { i, item -> i to item }. // create index value pairs
.groupBy { it.first / chunkSize }. // create grouping index
.map { it.value.map { it.second } } // split into different partitions
rrader
02/11/2017, 10:57 AMcarrot
02/11/2017, 9:29 PMoliverdain
02/12/2017, 1:21 AMClassifierTrainer<double[]>
I need to assign any such subclass to a Kotlin variable but can’t figure out a type that works. The obvious ClassifierTrainer<Array<Double>>
fails. Anyone know the right way to do this?sreich
02/13/2017, 10:06 AMSlackbot
02/13/2017, 2:17 PMvlastachu
02/13/2017, 2:53 PMclass A: B {}
kzotov
02/14/2017, 10:04 AMgildor
02/14/2017, 10:25 AMbernhard
02/14/2017, 5:52 PMif-else if-else
constructssreich
02/15/2017, 12:04 AMkirillrakhman
02/15/2017, 5:10 PMdmnk_89
02/16/2017, 3:56 PMeugene.kudelevsky
02/16/2017, 4:55 PMgroostav
02/16/2017, 10:19 PMkevinherron
02/16/2017, 11:30 PMmg6maciej
02/17/2017, 10:54 AMorangy
02/17/2017, 11:19 AMorangy
02/17/2017, 3:17 PMval a = listOf("a")
val b = listOf("A")
a.size == b.size && a.foldIndexed(true) { index: Int, acc: Boolean, s: String -> acc && b[index].equals(s, true)}
vlastachu
02/17/2017, 3:20 PMa.zip(b, {x,y -> x.value.equals(y.value) })
aw... there should be all()
.vlastachu
02/17/2017, 3:20 PMa.zip(b, {x,y -> x.value.equals(y.value) })
aw... there should be all()
.ilya.gorbunov
02/17/2017, 3:23 PMa
and b
differ in size