btw I think the type of your the function h is a -> c. I know its a minor typo, but it confused me while I was trying to follow.