A relaxed chat room about all things Scala. Beginner questions welcome. http://scala-lang.org/conduct/ applies
lrytz on 2.12.x
Fix race condition in PipelineM… Merge pull request #9455 from r… (compare)
retronym on 2.12.x
Fix and extend Array.apply vara… Merge pull request #9356 from r… (compare)
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