Created
October 23, 2015 04:14
-
-
Save killme2008/d8345301536980d1b64a to your computer and use it in GitHub Desktop.
Elixir custom sigis example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MySigils do | |
def sigil_i(string, []), do: String.to_integer(string) | |
def sigil_i(string, [?n]), do: -String.to_integer(string) | |
end |
Author
killme2008
commented
Oct 23, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment