Solutions to the 99 Problems, adapted to Haskell from Prolog