Hexa
11/10/2018, 5:41 PMk()
and when not to use it. val fruits = listOf("apple", "aabb", "ab", "apricot", "banana", "blueberry", "cherry", "coconut")
val evenFruits = fruits.k()
.fold(listOf<String>()) { acc, e -> if (e.length % 2 == 0) acc + e else acc }
val evenFruits2 = fruits
.fold(listOf<String>()) { acc, e -> if (e.length % 2 == 0) acc + e else acc }
println(evenFruits)
println(evenFruits2)
Hullaballoonatic
11/10/2018, 7:40 PMtoDouble()
all over my mathematics in kotlin 😑Jeremy
11/11/2018, 1:28 PMfrellan
11/11/2018, 3:48 PMobject CachedDB {
val Foods = object {
fun loadAll(): List<Food> = ...
}
}
I want to be able to call that function like this CachedDB.Foods.loadAll()
but I can’t
Do I have to move it all into a separate file?anli
11/11/2018, 8:53 PMwhen
?alexcouch
11/11/2018, 10:26 PMcndkhuong
11/12/2018, 6:50 AMOvsyannikov Alexey
11/12/2018, 7:35 AMdeviant
11/12/2018, 10:33 AMedwinRNDR
11/12/2018, 2:14 PMDias
11/12/2018, 4:18 PMMarc Knaup
11/12/2018, 4:52 PMJavier
11/12/2018, 8:18 PMigor.wojda
11/12/2018, 9:03 PM.teamcity/settings.kts
) - AS 3.2.1
2. Secound is that I can’t find link to proper documentation, where all the DSL syntax is explained in detailnwh
11/13/2018, 2:09 AMDavid Hamilton
11/13/2018, 8:30 AMhttk4k
and vavr-kotlin
for instance).
Both have published javadoc jars that are empty apart from the MANIFEST, and both use Gradle to build.
Also, the Kotlin stdlibs are missing from the available docsets.
It feels that this is a systemic problem for Kotlin, and one that is a real negative for someone, like me, who likes to read the statement of how the code is intended to be used, rather than just relying on the current implementation (in source)
Are there any plans to fix this?mersan
11/13/2018, 11:51 AMkotlin.Result
class set to inline class? what's the point of this limitation that we cannot use it as return type?peterholak
11/13/2018, 2:18 PMgotoOla
11/13/2018, 3:01 PMchristophsturm
11/13/2018, 3:13 PM@since 9
annotation for example). or do i have to use 1.8 to build?pp.amorim
11/13/2018, 3:20 PMCondition is always 'true'
? I tried to use @Suppress("SENSELESS_COMPARISON")
and @SuppressWarnings('ConstantConditions')
but both are not working .pp.amorim
11/13/2018, 3:21 PMCorentin Leffy
11/13/2018, 3:22 PMpdpi
11/13/2018, 4:36 PMinterface Foo {}
class Bar(): Foo {}
class DelegatedFoo: Foo by foo {
val foo by lazy { Bar() }
}
pniederw
11/13/2018, 9:44 PMkotlin-scripting-common:1.3.10
depends on kotlinx-coroutines-core:0.26.1-eap13
(an outdated EAP version)?bartvh
11/14/2018, 10:44 AMillegal usage of inline argument block
errorBernhard
11/14/2018, 11:50 AMcarlos cdmp
11/14/2018, 11:51 AMSlackbot
11/14/2018, 12:05 PMYutsa
11/14/2018, 3:39 PMclass BeerService(val repository : BeerRepository){
fun getBeerById(id : Long) : Beer? {
return repository.findById(id)
}
}
Yutsa
11/14/2018, 3:39 PMclass BeerService(val repository : BeerRepository){
fun getBeerById(id : Long) : Beer? {
return repository.findById(id)
}
}
sdeleuze
11/14/2018, 10:49 PM