An open API service indexing awesome lists of open source software.

https://github.com/qqwy/elixir_guard_safe_modulo

The ridiculous guard-safe implementation for a floored modulo operation.
https://github.com/qqwy/elixir_guard_safe_modulo

Last synced: 6 months ago
JSON representation

The ridiculous guard-safe implementation for a floored modulo operation.

Awesome Lists containing this project

README

          

# Modulo

This repository contains the source code that was extracted from [my Pull Request on the Elixir core language](https://github.com/elixir-lang/elixir/pull/5112).

It adds the `Modulo.mod/2` macro, which is a guard-safe implementation of the floored remainder operation.

Read the blog article I wrote about it [here](https://medium.com/@W_Mcode/down-the-rabbit-hole-defining-a-guard-safe-modulo-operation-in-elixir-6335ade7c078#.jx5phcwv9).