Creating a tail recursive rolling mean algorighm.