Skip to content

Commit

Permalink
fixup: Add nil case for i
Browse files Browse the repository at this point in the history
  • Loading branch information
xxdavid committed Sep 26, 2023
1 parent b2befb7 commit d3b5fa0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ i(State) when map_get(value, State) /= nil ->
case State of
#{value := Val} ->
add_one(Val)
end.
end;
i(nil) -> 0.

-spec add_one(integer()) -> integer().
add_one(N) -> N + 1.

0 comments on commit d3b5fa0

Please sign in to comment.