sreich
02/10/2017, 6:14 PMnstewart
02/14/2017, 8:58 PMbreak and continue are not yet available in inlined lambdas, but we are planning to support them too
. Is there any timeline on when that support would happen?elizarov
02/14/2017, 9:12 PMnstewart
02/14/2017, 9:18 PMnstewart
02/14/2017, 9:20 PMkirillrakhman
02/15/2017, 9:51 AMBooleanArray.any()
and BooleanArray.any { it }
not being the samekirillrakhman
02/15/2017, 9:52 AMany()
if there is isNotEmpty()
?orangy
first()
and first {}
kirillrakhman
02/15/2017, 10:18 AMkirillrakhman
02/15/2017, 10:18 AMmg6maciej
02/15/2017, 10:35 AMfun <T, K, V> List<T>.[toMap??](mapping: (T) -> Pair<K, V>): Map<K, V>
mg6maciej
02/15/2017, 10:36 AMkirillrakhman
02/15/2017, 10:36 AMassociate
kirillrakhman
02/15/2017, 10:36 AMmg6maciej
02/15/2017, 10:37 AMmg6maciej
02/15/2017, 10:37 AMkirillrakhman
02/15/2017, 10:37 AMorangy
associate
marcinmoskala
02/17/2017, 6:28 PMprivate fun getCollisionGroups(eventRects: List<EventRect>): List<MutableList<EventRect>> = eventRects
.sortedBy { it.event.startTime }
.fold(listOf<MutableList<EventRect>>(), { acc, elem ->
val collision = acc.firstOrNull { it.any { potentialCollision -> isEventsCollide(potentialCollision.event, elem.event) || (potentialCollision.event.isAllDay && elem.event.isAllDay) } }
if (collision != null) {
collision += elem; acc
} else acc.plusElement(mutableListOf(elem))
})
marcinmoskala
02/17/2017, 6:33 PMmarcinmoskala
02/17/2017, 6:33 PMfun <T> Iterable<T>.groupTogether(f: (List<MutableList<T>>, T) -> MutableList<T>?): List<MutableList<T>> {
return fold(listOf<MutableList<T>>()) { acc, elem ->
val chosenGroup = f(acc, elem)
if (chosenGroup != null) {
chosenGroup.add(elem); acc
} else {
acc.plusElement(mutableListOf(elem))
}
}
}
marcinmoskala
02/17/2017, 6:34 PMmarcinmoskala
02/17/2017, 6:35 PMval columns = collisionGroup.groupTogether { columns, eventRect ->
columns.firstOrNull { column -> !isEventsCollide(eventRect.event, column[column.size - 1].event) }
}
marcinmoskala
02/17/2017, 6:36 PM.groupTogether { acc, elem ->
acc.firstOrNull { it.any { potentialCollision -> isEventsCollide(potentialCollision.event, elem.event) || (potentialCollision.event.isAllDay && elem.event.isAllDay) } }
}
marcinmoskala
02/18/2017, 10:54 AMmarcinmoskala
02/18/2017, 10:57 AMmarcinmoskala
02/18/2017, 10:59 AMaimozg
02/18/2017, 3:58 PMfirstOrNull
into the extension too? Do you see any use-cases with test function inspecting more than one result group?james.cruz
02/21/2017, 4:02 AMrobin
02/22/2017, 10:30 AM@get:Convert(EnumStringConverter::class.java)
?