Hacker News new | ask | show | jobs
by rspencer 298 days ago
It is equivalent because it's not a plus-scan but a (0^+)-scan which resets every time it hits a null (there's a more in depth explanation here https://robertandrewspencer.com/aoc_2022_1/ )

Perhaps q did both force you to consider what was happening, and hide it from you...

1 comments

Thanks!

Though hopefully, once the idiom is learned, I'll be able to remember it :)

Curious as to why a scan \ rather than a reduction /?