Quiz
Quiz yourself on this chapter.
1
defmodule Sum do
def up_to(0), do: 0
def up_to(n), do: n + up_to(n - 1)
end
iex> Sum.up_to(6)
How many function calls to the up_to
function are made here?
A)
One
B)
Five
C)
Six
D)
Seven
Question 1 of 50 attempted
Get hands-on with 1200+ tech skills courses.