-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Squarer): add module to return the square of a given number
The Squarer module simply provides a square function that returns the square result of the number provided. The application has also had a supervisor added to enable basic running of the program.
- Loading branch information
Harvey Ball
committed
May 8, 2015
1 parent
7c548d7
commit 0791752
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
defmodule ElixirPoolboyExample do | ||
use Application | ||
|
||
def start(_type, _args) do | ||
children = [] | ||
|
||
options = [ | ||
strategy: :one_for_one, | ||
name: ElixirPoolboyExample.Supervisor | ||
] | ||
|
||
Supervisor.start_link(children, options) | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
defmodule ElixirPoolboyExample.Squarer do | ||
def square(x) do | ||
x * x | ||
end | ||
end |
This file contains 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