functional programming in scaskell