cedric
06/28/2016, 9:16 PMval l = listOf("a", "bb", "ccc", "bb", "ccc", "ccc")
l.groupBy { it.length }.map { e -> e.value[0] to e.key }
-> [(a, 1), (bb, 2), (ccc, 3)]
cedric
06/28/2016, 9:18 PMRuckus
06/28/2016, 9:19 PMcounts.put(it, 1 + counts.getOrElse(it, { 0 }))
over counts[it] = 1 + (counts[it] ?: 0)
(other than 0
being calculated lazily)?Ian
06/28/2016, 9:19 PMallWords.groupBy { it }.mapValues { it.value.size }
cedric
06/28/2016, 9:19 PMgroupBy
Ian
06/28/2016, 9:20 PMIan
06/28/2016, 9:20 PMsreich
06/28/2016, 9:28 PMsreich
06/28/2016, 9:28 PMchristopher
06/28/2016, 9:43 PMRuckus
06/28/2016, 9:44 PMchristopher
06/28/2016, 9:47 PMsreich
06/28/2016, 9:47 PMchristopher
06/28/2016, 9:47 PMsreich
06/28/2016, 9:48 PMsreich
06/28/2016, 9:48 PMorangy
Release Candidate build for Kotlin 1.0.3
It is probably last chance to test 1.0.3 build before it is released, and if something blocks you from using it in production when it’s out we want to know as soon as possible.
If you have just 10 minutes, please see https://kotlinlang.slack.com/archives/eap/p1467130882000094, install it into your IDE, update maven/gradle, and then build and test your project. If you have more than 10 minutes, you can use it for a while to see if IDE behaves well.
Thanks!michael.barker
06/28/2016, 9:58 PMartem_zin
06/28/2016, 10:03 PMfellshard
06/28/2016, 10:05 PMchristopher
06/28/2016, 10:07 PMpaulblessing
06/28/2016, 11:34 PMorangy
ilya.gorbunov
06/29/2016, 12:19 AMilya.gorbunov
06/29/2016, 1:01 AMbodiam
06/29/2016, 1:54 AMbodiam
06/29/2016, 1:54 AMbodiam
06/29/2016, 1:55 AMchristopher
06/29/2016, 1:57 AMkotlinc
, Gives you a command line REPLbodiam
06/29/2016, 1:57 AM