solve(A, D).
+solve(['1'], D) ->
+ io:format("The solution to puzzle 1 is: ~p", [solve(1, D)]);
solve(1, D) ->
lists:foldl(fun(X, {C, V}) ->
case X > V of
end,
{-1, 0},
D);
+solve(['2'], D) ->
+ io:format("The solution to puzzle 2 is: ~p", [solve(2, D)]);
solve(2, D) ->
solve(2, D, []).