Product comonad

please feel free to improve upon my code