Solved 001 in Haskell.
Solved 002 in Haskell.