Small functions from Codecademy course