Let it be mem() for memorize instead of ret().