The MonadFilter type-class is equipped with an additional
operation which allows us to create an "Empty" value for the Monad
(for whatever "empty" makes sense for that particular monad). This
is of particular interest to us since it allows us to add a
filter method to a Monad, which is used when pattern matching or
using guards in for comprehensions.
The purpose of this type-class is to support the data-types in the
Monix library and it is considered a shim for a lawful type-class
to be supplied by libraries such as Cats or Scalaz or equivalent.
To implement it in instances, inherit from MonadFilterClass.
Credit should be given where it is due.The type-class encoding has
been copied from the Scado project and
Scalaz 8 and the type has
been extracted from Cats.