HieiJ
10/30/2018, 1:16 PMLeandro Borges Ferreira
10/30/2018, 1:33 PMLeandro Borges Ferreira
10/30/2018, 1:44 PMHieiJ
10/30/2018, 2:12 PMHieiJ
10/30/2018, 5:24 PMraulraja
10/30/2018, 9:02 PMraulraja
10/30/2018, 9:03 PMraulraja
10/30/2018, 9:03 PMHieiJ
10/31/2018, 1:30 PMLeandro Borges Ferreira
10/31/2018, 9:55 PMbind()
inside your comprehension, you don't need it =]Leandro Borges Ferreira
10/31/2018, 10:00 PMfun <F, A> find(key: Key, monad: Monad<F>): Work<Kind<F, A>> {
work { monad.just(Unit) })
}
Leandro Borges Ferreira
10/31/2018, 10:03 PMval found = Database.find("foo", Option.monad())
Leandro Borges Ferreira
10/31/2018, 10:05 PMHieiJ
11/01/2018, 5:21 PMLeandro Borges Ferreira
11/01/2018, 7:57 PMLeandro Borges Ferreira
11/01/2018, 7:58 PMbinding
part) when you need to flatten a code that has many `flatMap`'sLeandro Borges Ferreira
11/01/2018, 8:02 PMKind
, to use can make a more generic code. You can take a look here: https://arrow-kt.io/docs/patterns/polymorphic_programs/ (It is a bit hard to understand at first, but it is a great concept)HieiJ
11/01/2018, 8:50 PMKind
and higher-kinded types; as I stated, I tried to make the code more similar to the orginal example in scala in order to keep it focused on the reader/writer data types.