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 GreekTax.Helper do | |
@moduledoc false | |
import NimbleParsec | |
@number [?0..?9] | |
def sep_number(sep) do | |
ascii_string(@number, 3) | |
|> ignore(string(sep)) | |
|> ascii_string(@number, 5) |
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 Exercise do | |
def gcd(x, 0), do: x | |
def gcd(x, y) do | |
IO.puts("gcd(#{x}, #{y})") | |
gcd(y, rem(x,y)) | |
end | |
end |