I like the Arc idiom for this. Here&#x27;s how to sort a list (say of stories) by some computed value (say a function called score):<p><pre><code>  (sort (compute &gt; score) stories)
</code></pre>
If score is expensive, you just wrap it in memo:<p><pre><code>  (sort (compare &gt; (memo score)) stories)
</code></pre>
Now it will compute each score once, save them in a table, and throw the table away when done.