Quiz
Test your knowledge of writing a functional core.
1
In the following code, what role does Point.left/1
play?
defmodule Point do
def new() do
{0, 0}
end
def left({x, y}) do
{x+1, y}
end
def right({x, y}) do
{x+1, y}
end
def as_string(point) do
inspect(point)
end
end
A)
Constructor
B)
Reducer
C)
Converter
D)
Create
Question 1 of 50 attempted
Get hands-on with 1400+ tech skills courses.