pakoito
03/10/2021, 4:47 PMfun (Traverse<F>, Applicative<G>, Kind<F, Kind<G, A>>).sequence(): Kind<G, Kind<F, A>> =
traverse(::it)
CLOVIS
03/10/2021, 4:52 PMOption.map
? (even if it doesn't exist anymore, it's just much simpler to think about...)pakoito
03/10/2021, 4:55 PMCLOVIS
03/10/2021, 4:56 PMpakoito
03/10/2021, 4:56 PMfun (Functor<F>, Kind<F, A>).map(f: (A) -> B): Kind<F, B> =
map(f)
pakoito
03/10/2021, 4:56 PMCLOVIS
03/10/2021, 4:57 PMKind<F, Kind<G, A>>
as F<G<A>>
, it's definitely not beginner-friendly currentlypakoito
03/10/2021, 4:58 PMfun (Applicative<G>, Option<A>).map(f: (A) -> B): G<Option<B>>
pakoito
03/10/2021, 4:58 PMCLOVIS
03/10/2021, 5:04 PM@with<Functor<F>>
fun F<A>.map(f: (A) -> B): F<B> =
map(f)
(That example might be useless, I just want to understand how the concepts I'm learning in Category Theory and Type Theory will be used in Kotlin)