First commit

This commit is contained in:
Mariano Uvalle 2020-06-20 13:57:33 -05:00
commit 1dba0af064
36 changed files with 1065 additions and 0 deletions

12
circle.ex Normal file
View file

@ -0,0 +1,12 @@
defmodule Circle do
@moduledoc "Implements basic circle functions"
@pi 3.14159
@doc "Computes the area of a circle"
@spec area(number) :: number
def area(r), do: r * r * @pi
@doc "Computes the circumferenc of a circle"
@spec circumference(number) :: number
def circumference(r), do: 2 * r * @pi
end