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

Add support to sum mixed currencies #15

Merged
merged 5 commits into from
Sep 29, 2022

Conversation

kaiosilveira
Copy link
Owner

Thanks to our previous work, to implement a multi-currency addition we just need to update the Sum class to reduce its members. That's what this PR does. With this, our goal is finally reached!

Task list:

  • $5 + 10CHF = $10 if rate is 2:1 🎯 🎉 ✨
  • $5 + $5 = $10 ✅
  • Return Money from $5 + $5
  • Bank.reduce(Money)
  • Reduce Money with conversion ✅
  • Reduce(Bank, String)
  • Sum.plus
  • Expression.times

Task list:
- $5 + 10CHF = $10 if rate is 2:1 🎯 👈🏼
- $5 + $5 = $10 ✅
- Return Money from $5 + $5
- Bank.reduce(Money) ✅
- Reduce Money with conversion ✅
- Reduce(Bank, String) ✅
Task list:
- $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
- $5 + $5 = $10 ✅
- Return Money from $5 + $5
- Bank.reduce(Money) ✅
- Reduce Money with conversion ✅
- Reduce(Bank, String) ✅
Task list:
- $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
- $5 + $5 = $10 ✅
- Return Money from $5 + $5
- Bank.reduce(Money) ✅
- Reduce Money with conversion ✅
- Reduce(Bank, String) ✅
Task list:
- $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
- $5 + $5 = $10 ✅
- Return Money from $5 + $5
- Bank.reduce(Money) ✅
- Reduce Money with conversion ✅
- Reduce(Bank, String) ✅
Task list:
- $5 + 10CHF = $10 if rate is 2:1 🎯 ✅ 🎉 ✨
- $5 + $5 = $10 ✅
- Return Money from $5 + $5
- Bank.reduce(Money) ✅
- Reduce Money with conversion ✅
- Reduce(Bank, String) ✅
- Sum.plus
- Expression.times
@kaiosilveira kaiosilveira merged commit 696fcf6 into main Sep 29, 2022
@kaiosilveira kaiosilveira deleted the chapter15/sum-mixed-currencies branch September 30, 2022 16:05
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

1 participant