Added init() function, like Haskell's init.