memorize the function's return value up-until n-calls. after this, unmemorized call arguments will either return the optional default_value (if it was provided), or it will return value of the nth call (final call that got memorized).