Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example of encoding Functor/Applicative/Monad from cats with Dotty 0.15 features. | |
* Derived in part from Cats -- see https://github.com/typelevel/cats/blob/master/COPYING for full license & copyright. | |
*/ | |
package structures | |
import scala.annotation._ | |
trait Functor[F[_]] { | |
def (fa: F[A]) map[A, B](f: A => B): F[B] | |
def (fa: F[A]) as[A, B](b: B): F[B] = |