4 ms·
Just got it in my head after wondering the same. So we have some prefix of the list we don't care about (_) appended (++) to a variable ($p) consed before p + 2
by hayley-patton 3y ago
Just got it in my head after wondering the same. So we have some prefix of the list we don't care about (_) appended (++) to a variable ($p) consed before p + 2 (#(p + 2)) consed before a suffix we don't care about (_), then produce the pair (p, p + 2) for each match.
- crabbone 3y agoYeah... and nobody knows what happens first. It's impossible to follow the execution of this gibberish because nobody knows operator precedence, and even if that was somehow hard-wired into your brain, having to re-scan the same line multiple times and sort out the priorities still takes a lot of time and will fail for large-ish (5+ elements) problem instances because people cannot hold that many elements in active memory.