qfpl / dollaridoos Goto Github PK
View Code? Open in Web Editor NEWA typesafe wrapper around monetary values represented as numeric values, allowing only sensible operations.
License: BSD 3-Clause "New" or "Revised" License
A typesafe wrapper around monetary values represented as numeric values, allowing only sensible operations.
License: BSD 3-Clause "New" or "Revised" License
Given that we've chosen addition as the monoid for money, we can define an instance for Group too.
But where should we get group from? The groups package seems almost unused, and I can't find its source on github.
Maybe we should depend on the albegra package instead.
It's worth looking at that package. As well as group, what other algebraic structures does it provide that money fits?
We provide optics, but we could just as easily define and export them without a dependence on the lens package itself. That would make the package more attractive to people who don't want such a large dependency.
We don't use the optics for anything fancy internally so this seems like a win.
I would like to see this lib on {h,st}ackage. Alas, money is taken, as is simple-money and safe-money.
Some ideas:
Operations in dollaridoos blindly defer to the numeric operations upon the wrapped type.
For bounded numeric types, this can result in overflow or underflow errors.
As this library is designed for safer and more correct monetary computations, it would be
proper to caution the user regarding use with bounded types.
It would be good to set up some kind of continuous integration for this project so that pull requests are compiled and that sort of thing. Travis seems to be a popular thing for this? I should go and learn how to use it or another tool.
Data.Data? Generic? Not sure.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.