An example of implementing some math functions using Elixir.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.gitignore
.travis.yml
LICENSE
README.md
mix.exs
mix.lock

README.md

MathFunctions

Build Status Coverage Status

This is a code exercise to implement the following math functions:

  • Min
  • Max
  • Average
  • Mode

The goal is to implement them in the lowest level possible without making use of built-in functions.

Usage

You can run this from iex like so:

$ iex -S mix
$ iex(1)> MathFunctions.min([5, 2, 3])
$ 2

See a detailed view of the test results by running:

$ mix test --trace