pakoito
03/01/2019, 10:16 PMpakoito
03/01/2019, 10:18 PMtomasruizlopez
03/08/2019, 12:04 PMstojan
03/08/2019, 4:57 PMtoString
?raulraja
03/09/2019, 1:23 PMKind
to a minimal module arrow-kinds
pakoito
03/10/2019, 3:57 AMpakoito
03/10/2019, 12:42 PMsimon.vergauwen
03/16/2019, 1:33 PMkotlinc
but they removed or deprecated it.simon.vergauwen
03/16/2019, 1:33 PMImran/Malic
03/17/2019, 12:18 PMraulraja
03/17/2019, 8:33 PMraulraja
03/20/2019, 9:29 PM@higherkind data class ListK<A>(val list: List<A>): ListKOf<A>
// Generates the following code:
//
// class ForListK private constructor() { companion object {} }
// typealias ListKOf<A> = Kind<ForListK, A>
// fun ListKOf<A>.fix() = this as ListK<A>
sam
03/20/2019, 9:30 PMsam
03/20/2019, 9:31 PMraulraja
03/20/2019, 9:43 PM@extension
but shouldn't the arrow module be jvm
only since arrow is only published in the JVM for now?raulraja
03/21/2019, 1:05 AMpakoito
03/22/2019, 12:44 PMImran/Malic
03/23/2019, 8:48 AMpakoito
03/26/2019, 5:33 PMpakoito
03/26/2019, 10:47 PMaballano
04/01/2019, 4:48 PMIO<Either<E, A>>
to flatmap to another one in case the inner Either is left
?
I managed to do this, but I believe the same IO is being executed twice in case of the either is right
fun <E, A> IO<Either<E, A>>.handleErrorWith(f: (E) -> IO<Either<E, A>>): IO<Either<E, A>> {
return flatMap { either ->
either.fold(ifLeft = {
f(it)
}, ifRight = { this })
}
}
aballano
04/01/2019, 4:52 PMBIO<E, A>
exactly for this, but I happen to have this week for now to try it out 😄 Although if there's anything I can do on the PR to help... cc @pakoitoaballano
04/03/2019, 9:34 AM// Android's fragment code
override fun onResume() {
super.onResume()
unsafe {
runBlocking {
fx {
println("DEBUG onResume 0 $threadName")
continueOn(NonBlocking)
println("DEBUG onResume 1 $threadName")
continueOn(Dispatchers.Default)
println("DEBUG onResume 2 $threadName")
continueOn(Dispatchers.Main)
println("DEBUG onResume main $threadName")
}
}
}
}
output is:
DEBUG onResume 0 main
DEBUG onResume 1 ForkJoinPool-1-worker-2
DEBUG onResume 2 DefaultDispatcher-worker-2
raulraja
04/05/2019, 11:57 AMpakoito
04/05/2019, 12:31 PMraulraja
04/10/2019, 8:18 AMraulraja
04/10/2019, 1:34 PMpakoito
04/15/2019, 8:29 AM<|>
is not there because we don’t have/use operator, that’s an easy one 😄 We could accept a PR for a function version of it and many
.Imran/Malic
04/18/2019, 8:05 AMAriostonj
04/24/2019, 1:34 AMAriostonj
04/24/2019, 1:34 AMraulraja
04/24/2019, 9:38 AMrun
just iterates over the list applying a transformation and combining all internal values with the Monoid of the elements