First off, great library! Thanks for providing it!
Sorry of this has been discussed before, but I have some thoughts regarding Money.divide.
I wonder if it would be possible to rename the current behaviour of divide to split, as the name of that function right now is quite confusing. Split is a more appropriate name for this if we look at other examples, such as String.split or Enum.split. Both of these behave differently, but they operate on collections and return collections. Lists in this case. But I wouldn't expect a function named divide to do that, as I'd expect it to do the math operation of division instead.
What are your thoughts? Any particular reason divide was chosen that I just don't know about? :)
Edit: Nevermind, I was confused by another library also called Money, but where the app is :ex_money.
Hey!
First off, great library! Thanks for providing it!
Sorry of this has been discussed before, but I have some thoughts regarding
Money.divide
.I wonder if it would be possible to rename the current behaviour of divide to split, as the name of that function right now is quite confusing. Split is a more appropriate name for this if we look at other examples, such as
String.split
orEnum.split
. Both of these behave differently, but they operate on collections and return collections. Lists in this case. But I wouldn't expect a function nameddivide
to do that, as I'd expect it to do the math operation of division instead.What are your thoughts? Any particular reason divide was chosen that I just don't know about? :)
Edit: Nevermind, I was confused by another library also called Money, but where the app is :ex_money.