Hacker News new | ask | show | jobs
by eatonphil 1835 days ago
Interesting use of <details> to show the results of a computation. I missed the explanation in the beginning that said the results were precomputed. I thought clicking it was running. Format-wise since it's not actually running when clicked, I'm not sure hiding the result behind <details> is much clearer than just including the result as displayed by the REPL in the same snippet.
2 comments

As a flipside argument, it may be useful in an article like this to help people test their own intuition on what a piece of code will do.
My only complaint is that the icon looks like the "play" icon. Otherwise, I like it.