The strict identity type constructor.
The strict identity type constructor. Can be thought of as Tuple1
, but with no
runtime representation.
Returns f
applied to the contents of as
if non-empty, otherwise, the zero element of the Monoid
for the type B
.
Returns f
applied to the contents of as
if non-empty, otherwise, the zero element of the Monoid
for the type B
.
LeftProjection is isomorphic to Validation, when the type parameter E
is partially applied.
LeftProjection is isomorphic to Validation, when the type parameter E
is partially applied.
LeftProjection is isomorphic to Validation
LeftProjection is isomorphic to Validation
RightProjection is isomorphic to Validation, when the type parameter A
is partially applied.
RightProjection is isomorphic to Validation, when the type parameter A
is partially applied.
RightProjection is isomorphic to Validation
RightProjection is isomorphic to Validation
LeftProjection is isomorphic to Validation, when the type parameter E
is partially applied.
LeftProjection is isomorphic to Validation, when the type parameter E
is partially applied.
LeftProjection is isomorphic to Validation
LeftProjection is isomorphic to Validation
RightProjection is isomorphic to Validation, when the type parameter A
is partially applied.
RightProjection is isomorphic to Validation, when the type parameter A
is partially applied.
RightProjection is isomorphic to Validation
RightProjection is isomorphic to Validation
LeftProjection is isomorphic to Validation, when the type parameter E
is partially applied.
LeftProjection is isomorphic to Validation, when the type parameter E
is partially applied.
LeftProjection is isomorphic to Validation
LeftProjection is isomorphic to Validation
RightProjection is isomorphic to Validation, when the type parameter A
is partially applied.
RightProjection is isomorphic to Validation, when the type parameter A
is partially applied.
RightProjection is isomorphic to Validation
RightProjection is isomorphic to Validation
Catamorphism over the option.
Catamorphism over the option. Returns the provided function some
applied to item contained in the Option
if it is defined, otherwise, the provided value none
.
Constructs a non-empty list with the given string if it is not empty, otherwise, returns the second argument.
Constructs a non-empty list with the given string if it is not empty, otherwise, returns the second argument.
Constructs a non-empty list with the value if it is not empty, otherwise, throws an error.
Constructs a non-empty list with the value if it is not empty, otherwise, throws an error.
Computes the difference between the current and previous values of a
Computes the difference between the current and previous values of a
Right biased monad
Right biased monad
Alias for cata
Alias for cata
Returns the given value if None, otherwise lifts the Some value and passes it to the given function.
Returns the given value if None, otherwise lifts the Some value and passes it to the given function.
Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.
Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.
Warning: the triangle inequality will not hold if b - a
overflows.
Warning: the triangle inequality will not hold if b - a
overflows.
Intersperse the element a
between each adjacent pair of elements in as
Intersperse the element a
between each adjacent pair of elements in as
Intersperse the element a
between each adjacent pair of elements in as
Intersperse the element a
between each adjacent pair of elements in as
Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.
Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.
Returns the same String value if the given value is 1 otherwise pluralises this String by appending an "s" unless this String ends with "y" and not one of ["ay", "ey", "iy", "oy", "uy"] in which case the 'y' character is chopped and "ies" is appended.
Returns the same String value if the given value is 1 otherwise pluralises this String by appending an "s" unless this String ends with "y" and not one of ["ay", "ey", "iy", "oy", "uy"] in which case the 'y' character is chopped and "ies" is appended.
We could derive set equality from Equal[A]
, but it would be O(n^2)
.
Instead, we require
Order[A], reducing the complexity to
O(log n)
We could derive set equality from Equal[A]
, but it would be O(n^2)
.
Instead, we require
Order[A], reducing the complexity to
O(log n)
If Equal[A].equalIsNatural == true
, than Any#==
is used.
An alternative scalaz.Applicative instance for Stream
, discriminated by the type tag scalaz.Tags.Zip,
that zips streams together.
An alternative scalaz.Applicative instance for Stream
, discriminated by the type tag scalaz.Tags.Zip,
that zips streams together.
Example:
streamZipApplicative(Stream(1, 2), Stream(3, 4))(_ * _) // Stream(3, 8)
Tuple1[A]
is isomorphic to Id[X]
Tuple1[A]
is isomorphic to Id[X]
Product functor and comonad
Product functor and comonad