-
-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from dalexj/clearer-sum-of-multiples
Get rid of sum of multiples default arguments
- Loading branch information
Showing
3 changed files
with
9 additions
and
13 deletions.
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
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,11 +1,9 @@ | ||
defmodule SumOfMultiples do | ||
@doc """ | ||
Adds up all numbers from 1 to a given end number that are multiples of the factors provided. | ||
The default factors are 3 and 5. | ||
""" | ||
@spec to(non_neg_integer, [non_neg_integer]) :: non_neg_integer | ||
def to(limit, factors \\ [3, 5]) do | ||
def to(limit, factors) do | ||
|
||
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