Provides a function to memoise futures.