This is an example of a prime factors generator developed in a TDD style, like one would do for a Code Kata.
The goal is to be able to factor out a list of primes for a given input number.
Elixir is a functional meta-programming aware language built on top of the Erlang VM. It is a dynamic language with flexible syntax with macros support that leverages Erlang's abilities to build concurrent, distributed, fault-tolerant applications with hot code upgrades.
More information can be found on the Elixir website.
This example was built with help from Mix. To execute the tests, simply enter mix test
on the command line in the top level directory for the project.
$ pwd
/path/to/checkout/location/prime_factors_elixir
$ mix test
...
7 tests, 0 failures.
The modules under test is located under the lib
directory. The tests are located under the test
directory.