Skip to content

Instantly share code, notes, and snippets.

View jhickson's full-sized avatar

Jos Hickson jhickson

  • London
  • 13:42 (UTC +01:00)
View GitHub Profile
@smpallen99
smpallen99 / constants.ex
Created April 5, 2014 18:22
Approach for constants shared between modules in Elixir
defmodule Constants do
@moduledoc """
An alternative to use @constant_name value approach to defined reusable
constants in elixir.
This module offers an approach to define these in a
module that can be shared with other modules. They are implemented with
macros so they can be used in guards and matches
## Examples: