Discord is now Scala’s main chat platform. Please join us at https://discord.com/invite/scala
Show
typeclass, to allow further customization of the output, we're dealing with HTML here after all
FP in Scala
?final
to typeclass instance methods?
F[A]
) and monads
unit
, which means it can't be a monad (for both practical and theoretical reasons)F[A]
(kind * -> *
) - matter. This is the most neglected part, everyone's talking about "monads", in ways that generate lots of confusion. A good treatment of this helps you tremendously understanding the restMonoid
being an example
F[A]
as a standalone entities, as well as their relationship with typeclasses/algebras, especially the fact that algebras describe part of their behaviour, but some things are specific to each concrete datatype <-- failure to understand this leads to the "how do I get this value out of IO" fallacy
Exists
:trait Exists[A] { def apply(): Boolean }
object Exists extends Nope {
implicit def sure[A](implicit a: A): Exists[A] = new Exists[A] {
def apply() = true
}
}
trait Nope {
implicit def nope[A]: Exists[A] = new Exists[A] {
def apply() = false
}
}
def isEffect[T](implicit isIt: Exists[Effect[T]]) = isIt()
rho
issue
rho
only had Task