(A, B) => Cinto
A => B => C
(A => B) => (A => (B => C)) => (A => C)
F[B] => F[B => C] => F[C]
F[A => B] => F[A] => F[B], which is the key signature of the
gand noticing basically
(A => B) => (A => C)
F[B] => F[C]
F[A] => F[B]for consistency with the way things are usually written down
map: (A => B) => (F[A] => F[B]) ap: F[A => B] => (F[A] => F[B]) flatMap: (A => F[B]) => (F[A] => F[B])
A => B(uneffectful),
F[A =>B](effectful but no context sensitivity) and
A => F[B](the effect can depend on the output of the previous computation, since
A => F
I'll tell that to my manager when he starts about communication and presenting
https://typelevel.org/cats/datatypes/either.html#solution-2-adts-all-the-way-down talks about error ADTs, what's SOP for common errors that you want to share across modules?
i think usually you have a separate ADT that is shared across modules. if you can have direct dependencies, then the upper ADT can refer directly to the module error types. otherwise you can cast or translate the module errors into something like
Throwable which the upper ADT wraps
foo: Foo => BarI can get a
mFoo: M[Foo] => M[Bar], right?
Is this a known infringement of Order laws by FloatOrder and DoubleOrder?
cats.kernel.laws.discipline.OrderTests[Float].laws.partialCompare(Float.NaN, Float.NaN) // => IsEq(false, true) cats.kernel.laws.discipline.OrderTests[Float].laws.partialCompare(-0f,0f) // => IsEq(false, true)
This comes down to
java.lang.Float being inconsistent with builtin
float by design
tailRecMpractically speaking is a stack safe
Eitherrepresents whether to terminate or keep recursing). You may not be able to implement a stack safe one easily, but you should at least be able to match the signature. Take a look at the existing data types tailRecM to get some ideas of how to write them.