exercise 3 - curry function; failed attempt of uncurry function