Note:
<example>
is meant to denote text replaced by you (including brackets).
// global dependencies
npm install -g knex
defmodule NumberToWord do | |
@spec say(integer) :: String.t | |
def say(n), do: n |> say_io() |> IO.iodata_to_binary() | |
@spec say_io(integer) :: iodata | |
def say_io(1), do: "one" | |
def say_io(2), do: "two" | |
def say_io(3), do: "three" | |
def say_io(4), do: "four" | |
def say_io(5), do: "five" |