Skip to content

Instantly share code, notes, and snippets.

View ddevlin's full-sized avatar

David Devlin ddevlin

View GitHub Profile
@ddevlin
ddevlin / katas.ex
Created August 12, 2016 13:32
Berlin.ex 11-08-2016 Roman Numerals Kata
defmodule Katas do
def numeral_to_int(numeral, numbers \\ []) do
case numeral do
"CM" <> rest -> numeral_to_int(rest, numbers ++ [900])
"CD" <> rest -> numeral_to_int(rest, numbers ++ [400])
"XC" <> rest -> numeral_to_int(rest, numbers ++ [90])
"XL" <> rest -> numeral_to_int(rest, numbers ++ [40])
"IX" <> rest -> numeral_to_int(rest, numbers ++ [9])
"IV" <> rest -> numeral_to_int(rest, numbers ++ [4])
@ddevlin
ddevlin / keybase.md
Created March 15, 2016 18:31
keybase.md

Keybase proof

I hereby claim:

  • I am ddevlin on github.
  • I am ddevlin (https://keybase.io/ddevlin) on keybase.
  • I have a public key ASDY0vVRlJmViv2so1OREkvjZjdF9qTZ6Phyk02o37gODwo

To claim this, I am signing this object: