Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion exercises/practice/clock/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"nathanchere",
"neenjaw",
"parkerl",
"sotojuan"
"sotojuan",
"madlep"
],
"files": {
"solution": [
Expand Down
5 changes: 3 additions & 2 deletions exercises/practice/clock/lib/clock.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule Clock do
@type t() :: %__MODULE__{hour: integer, minute: integer}
defstruct hour: 0, minute: 0

@doc """
Expand All @@ -7,7 +8,7 @@ defmodule Clock do
iex> Clock.new(8, 9) |> to_string
"08:09"
"""
@spec new(integer, integer) :: Clock
@spec new(integer, integer) :: t()
def new(hour, minute) do
end

Expand All @@ -17,7 +18,7 @@ defmodule Clock do
iex> Clock.new(10, 0) |> Clock.add(3) |> to_string
"10:03"
"""
@spec add(Clock, integer) :: Clock
@spec add(t(), integer) :: t()
def add(%Clock{hour: hour, minute: minute}, add_minute) do
end
end
Loading