The most generic utilities live here.
"com.github.morgen-peschke" % "commons-core" % commonsVersion
ivy"com.github.morgen-peschke::commons-core:$commonsVersion"
Provides quality of life syntax enhancements for the cats library.
Most of these do not provide additional functionality, rather they make existing capabilities
a bit easier to access. For example, there are helpers to avoid having to wrap a value in a
cats.data.Nested
, if only an occasional map
or flatMap
on the inner value is needed.
There are also some builders for more complex Eq
and Order
instances.
Currently, the only utility that adds a net-new capability is andThenF
, which is very similar
to parFlatTraverse
. As the name implies, it's intended primarily for use with
cats.data.Validated
, which cannot provide a lawful FlatMap
instance.
This typeclass encodes the upper and lower limits of a type. This is primarily useful when
paired with Numeric
or Integral
.
These provide a pure-Scala implementation of Python's slice notation and a parser for this notation.
This can be very handy when defining CLI interfaces.
Complete
provides a work-around for the issues caused by value discarding. See
the scaladoc for specifics.
This typeclass provides a way to declare that a conversion from one type to another exists, in a way that side-steps many of the pitfalls of implicit conversions.