Abacus
Abacus is a module for transforming other modules into metric systems.
For example :
defmodule Length do
use Abacus.SystemMetric
unit :cm
unit :mm, (1/10)
unit :dm, 10
unit :m, 100
unit :km, 100000
end
defmodule Money do
use Abacus.SystemMetric
unit :euro
unit :dollar, 1.06665
endThese modules make it possible to use functions to create values enclosed in a metric system and functions to manipulate these values.
For example :
- test/abacus_test.exs
- lib/abacus.ex (doctest comments)
You can see the documentation here :
xvw.github.io/abacus/index.html
Installation
If available in Hex, the package can be installed
by adding abacus to your list of dependencies in mix.exs:
def deps do
[{:abacus, "~> 1.0.0"}]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/abacus.