You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be misunderstanding the intention, but I think I have found a bug in Either.
My understanding to the Either type is that Left should always short-circuit, as is stated in the readme.
However, as an example: Either.left('x').app(Either.left('y'))
will result in: Either.left('y')
rather than what I would expect: Either.left('x')
As a sanity check I wrote what I understood to be the equivalent in Haskell: Left 'x' <*> Left 'y'
which results in: Left 'x'
In an effort to improve test coverage, I have altered the EitherTest apply property test to test for this case:
I might be misunderstanding the intention, but I think I have found a bug in Either.
My understanding to the Either type is that Left should always short-circuit, as is stated in the readme.
However, as an example:
Either.left('x').app(Either.left('y'))
will result in:
Either.left('y')
rather than what I would expect:
Either.left('x')
As a sanity check I wrote what I understood to be the equivalent in Haskell:
Left 'x' <*> Left 'y'
which results in:
Left 'x'
In an effort to improve test coverage, I have altered the EitherTest apply property test to test for this case:
Please advise whether this is the intention, or if you would like I can open a PR with the test.
The text was updated successfully, but these errors were encountered: