Attempting to curry functions but not working