Created
August 3, 2017 13:03
-
-
Save mattroberts297/8e733546023894a9f4b14232c057f3a7 to your computer and use it in GitHub Desktop.
Cats class diagrams
This file contains hidden or 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
@startuml | |
skinparam monochrome true | |
skinparam classFontSize 16 | |
skinparam classFontStyle "Regular" | |
skinparam classFontName "Gill Sans" | |
skinparam classAttributeFontSize 14 | |
skinparam classAttributeFontStyle "Regular" | |
skinparam classAttributeFontName "Gill Sans" | |
interface "Functor[F[_]]" { | |
map[A, B](fa: F[A])(f: A => B): F[B] | |
} | |
interface "Cartesian[F[_]]" { | |
product[A, B](fa: F[A], fb: F[B]): F[(A, B)] | |
} | |
interface "Apply[F[_]]" { | |
ap[A, B](ff: F[A => B])(fa: F[A]): F[B] | |
} | |
interface "Applicative[F[_]]" { | |
pure[A](x: A): F[A] | |
} | |
interface "FlatMap[F[_]]" { | |
flatMap[A, B](fa: F[A])(f: A => F[B]): F[B] | |
} | |
interface "Monad[F[_]]" { | |
map[A, B](fa: F[A])(f: A => B): F[B] | |
} | |
"Functor[F[_]]" <|-- "Apply[F[_]]" | |
"Cartesian[F[_]]" <|-- "Apply[F[_]]" | |
"Apply[F[_]]" <|-- "Applicative[F[_]]" | |
"Apply[F[_]]" <|-- "FlatMap[F[_]]" | |
"FlatMap[F[_]]" <|-- "Monad[F[_]]" | |
"Applicative[F[_]]" <|-- "Monad[F[_]]" | |
@enduml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Monad.png