poohbar
08/03/2018, 6:25 PMCompletableFuture<List<Person>>
from
List<CompletableFuture<Person>>
I can't wrap my head around it 😕Shawn
08/03/2018, 9:27 PMkevin.cianfarini
08/04/2018, 3:07 AMapi.getArtists()
is a suspending function itself so I haven't quite figured out how to overcome that yet since buildIterator
is not a suspending contextadam-mcneilly
08/05/2018, 4:02 PMMahdi Javaheri
08/06/2018, 6:57 AMTodor Atanasov
08/06/2018, 7:32 AMCan Orhan
08/06/2018, 2:08 PMsealed class Seal {
class InnerClass: Seal()
ReferencedClass::class
}
Siva
08/06/2018, 2:16 PMdeinspanjer
08/06/2018, 2:17 PM@Configuration @ConfigurationProperties class AppProps { @NotNull lateinit var sourceRoot: String}
and later on, inside a component class: @Component class Platform(..., appProps: AppProps) { init { val sourceRoot = appProps.sourceRoot } }
but when I try to print that val, it is empty.Aregev2
08/06/2018, 4:13 PMmutableListOf(a, b, c, d)
to a map when {a=b, c=d}
?Aregev2
08/06/2018, 4:15 PMkarelpeeters
08/06/2018, 4:29 PM.chunked(2)
works too.cored
08/06/2018, 4:32 PMAregev2
08/06/2018, 4:51 PMval nested = listOf(listOf(12), listOf(12))
val (one, two) = nested
println("$one, $two")
That throws IOFB exception, I do not understand whyAregev2
08/06/2018, 5:27 PMisEmpty()
and none()
?elye
08/07/2018, 6:42 AMmarschwar
08/08/2018, 2:49 PMsealed class MyTypes
class A : MyTypes()
class B : MyTypes()
class Wrapper<out T : MyTypes>(val wrapped: T)
val wrappedValue: Wrapper<MyTypes> = Wrapper(A())
val nothing = when (wrappedValue.wrapped) {
is A -> doSomethingWithA(wrappedValue as Wrapper<A>)
is B -> doSomethingWithB(wrappedValue as Wrapper<B>)
}
fun doSomethingWithA(a: Wrapper<A>) = Unit
fun doSomethingWithB(b: Wrapper<B>) = Unit
Is there any way I can get rid of the unchecked cast within the when
?nfrankel
08/08/2018, 4:40 PMbdawg.io
08/08/2018, 5:10 PMBernhard
08/09/2018, 6:24 AMjk2018
08/09/2018, 9:52 AMKonstantin Petrukhnov
08/10/2018, 12:53 PMpoohbar
08/10/2018, 1:40 PMdata class Account(a: Int, b: Int)
data class Person(name:String, account:Account)
is there a way to expose account's properties on person?
anything better than:
val a get() = account.a
?rakeeb
08/11/2018, 1:07 AMtateisu
08/12/2018, 11:40 PMgabrielfv
08/14/2018, 4:35 PMval foo = bar ?: null.also { /* do something only when null */ }
Ayden
08/15/2018, 12:24 PMMohamed Ebrahim
08/16/2018, 3:52 AMSlackbot
08/16/2018, 5:56 PMpoohbar
08/16/2018, 7:38 PMcopy()
😞poohbar
08/16/2018, 7:38 PMcopy()
😞Andreas Sinz
08/16/2018, 7:45 PMclass Person(val name: String) {
val updated = Instant.now()
@JvmOverloads
fun copy(name: String = this.name) = Person(name)
}