add problem6.hs