So I'm looking for examples of truly idiomatic code in computer languages --- something where a fluent programmer would easily understand what is going on at a high level, but you'd have to program a compiler or interpreter to "recognize" the construct in order to treat it more efficiently than the language definition would imply.
The only one I can think of, off the top of my head, is Array.prototype.slice.call(arguments) in Javascript (e.g. https://stackoverflow.com/questions/7056925/how-does-array-prototype-slice-call-work) which makes a real Array object out of a function's arguments, which are not an Array.