| If you're interested in how Category theory and Algebra can inform the design of software, have a look at ZIO Prelude. https://github.com/zio/zio-prelude It's a brand new library for Scala that contains reusable mathematical structures. Still based on algebra and category theory, but it expresses them more or less differently than how they've been expressed in Haskell (and similar languages). For example, unlike Haskell (and Scala's own cats and ScalaZ), it doesn't present the "traditional" Functor -> Applicative -> Monad hierarchy. Instead, it presents the mathematical concepts in a more orthogonal and composable way. One example out of many, you don't have a Monad. You have two distinct structures: * Covariant functor, with typical map operation `map[A, B](f: A => B): F[A] => F[B]` * IdentityFlatten which has a flatten operation `flatten[A](ffa: F[F[A]]): F[A]` and an identity element `any: F[Any]` When combined together (Scala has intersection types), you get something equivalent to the traditional Monad. The project is in its infancy, so it may still change significantly, though.
Look here for more detailed explanation: https://www.slideshare.net/jdegoes/refactoring-functional-ty... https://www.youtube.com/watch?v=OwmHgL9F_9Q |