prob.hs exercise