If you change the first line to `val oe: Eq<Opt...
# arrow
p
If you change the first line to
val oe: Eq<Option<Int>> =
instead of the inferred `OptionEq<A>`then the second line will stop working
j
Thanks @pakoito. Turning on type hints definitely helped. After thinking about what you wrote, and taking a closer look at the Arrow library code, I tried this:
Copy code
val eq1 = Eq<Int> { a, b -> a == b }
val oe = Option.eq(eq1)
val eq2 = oe.EQ()
assert(eq1 === eq2) // passes
Which made me realize (duh! 😆), the
eq
is the same instance that I set.
p
eeeexactly