basic recursive haskell functions