Taken from scala-with-cats by Noel Welsh and Dave Gurnell
pure
, of typeA => F[A]
pure
abstracts over constructors, providing a way to create a new monadic context from a plain value.
flatMap
, of type(F[A], A => F[B]) => F[B]
flatMap
extracts the value from a context and generates the next context in the sequence.