adding prob4 for haskell
adding prob12 solution for java