Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Fear::Either#left #169

Merged
merged 1 commit into from
Mar 24, 2024
Merged

Conversation

bolshakov
Copy link
Owner

Projects this Fear::Either as a Fear::Left. This allows performing right-biased operation of the left
side of the Fear::Either:

Fear.left(42).left.map(&:succ)  #=> Fear.left(43)
Fear.right(42).left.map(&:succ) #=> Fear.left(42)

@bolshakov bolshakov self-assigned this Mar 24, 2024
Projects this `Fear::Either` as a `Fear::Left`. This allows performing right-biased operation of the left
side of the `Fear::Either`:

```ruby
Fear.left(42).left.map(&:succ)  #=> Fear.left(43)
Fear.right(42).left.map(&:succ) #=> Fear.left(42)
```
@bolshakov bolshakov force-pushed the feature/either-left-projection branch from 05845a0 to 246f24f Compare March 24, 2024 12:20
@bolshakov bolshakov merged commit 87c22ca into master Mar 24, 2024
7 checks passed
@bolshakov bolshakov deleted the feature/either-left-projection branch March 24, 2024 12:23
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8409238292

Details

  • 74 of 77 (96.1%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 99.239%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/fear/either.rb 2 3 66.67%
lib/fear/either/left_projection.rb 55 56 98.21%
lib/fear/utils/assertions.rb 16 17 94.12%
Totals Coverage Status
Change from base Build 8409234081: -0.2%
Covered Lines: 1173
Relevant Lines: 1182

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants