pure functional and generic programming for Erlang
You could do this with a macro, but…
the best macro is a macro you don’t maintain
datum is a pure functional and generic programming for Erlang. It had its origins in Purely Functional Data Structures by Chris Okasaki, on implementing a various higher rank functional abstractions and patterns, on dealing with scrap your boilerplate and gaining experience from other functional languages primary Scala and Haskell. The library is still testing the limits of functional abstractions in Erlang.
The feature overview provides an introduction to datum features, use-cases and reasoning of they existence:
option
and either
type notationsThe latest version of the library is available at its master
branch. All development, including new features and bug fixes, take place on the master
branch using forking and pull requests as described in contribution guidelines.
The stable library release is available via hex packages, add the library as dependency to rebar.config
{deps, [{datum}]}.
Please follow the feature overview to start leaning all available features; then continue to library examples and to source code.
The library is Apache 2.0 licensed and accepts contributions via GitHub pull requests:
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)The development requires Erlang/OTP version 19.0 or later and essential build tools.
Build and run service in your development console. The following command boots Erlang virtual machine and opens Erlang shell.
git clone https://github.com/fogfish/datum
cd datum
make
make run
The commit message helps us to write a good release note, speed-up review process. The message should address two question what changed and why. The project follows the template defined by chapter Contributing to a Project of Git book.
>
Short (50 chars or less) summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together.
Further paragraphs come after blank lines.
Bullet points are okay, too
Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here
If you experience any issues with the library, please let us know via GitHub issues. We appreciate detailed and accurate reports that help us to identity and replicate the issue.
Specify the configuration of your environment. Include which operating system you use and the versions of runtime environments.
Attach logs, screenshots and exceptions, in possible.
Reveal the steps you took to reproduce the problem, include code snippet or links to your project.