Functional solution for problem 5
Functional solution for problem 6
Changed name of number type