Add splitAt function for List