A mapreduce algorithm written in elixir