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

Flip the argument order of Future.or #74

Merged
merged 1 commit into from
Feb 22, 2017
Merged

Flip the argument order of Future.or #74

merged 1 commit into from
Feb 22, 2017

Conversation

Avaq
Copy link
Member

@Avaq Avaq commented Feb 14, 2017

I though and had the wrong order of arguments, but really it was or all-along. I think both and and or should have non-inverted arguments (as opposed to most static functions), so:

Future.ap(a, b)  === b.ap(a);
Future.or(a, b)  === a.or(b);
Future.and(a, b) === a.and(b);

I think this is much more expected behavior, and has the arguments in the right order for reduce.

@Avaq Avaq changed the title Fix the argument order of Future.or Flip the argument order of Future.or Feb 14, 2017
@codecov-io
Copy link

codecov-io commented Feb 14, 2017

Codecov Report

Merging #74 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master    #74   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         929    929           
  Branches      219    219           
=====================================
  Hits          929    929
Impacted Files Coverage Δ
fluture.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6af85fd...c23956c. Read the comment docs.

@Avaq Avaq merged commit 96c8a8c into master Feb 22, 2017
Avaq added a commit that referenced this pull request Feb 23, 2017
Breaking changes

- #74 The argument order of `Future.or()` has been flipped
- #75 `Future.isForkable()` has been removed
- #75 `Future.fromForkable()` has been removed
- #75 `Future.cast()` has been removed

New features

- #70 Add a new ConcurrentFuture type

Bug fixes and improvements

- #4 #69 All curried functions now fail fast
- #59 Update Sanctuary interoperability
- #73 `Future.finally()` now runs `finally` computation when cancelled
@Avaq Avaq deleted the av-fix-or branch May 7, 2017 18:10
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.

None yet

2 participants