Discussion about this post

User's avatar
Yacob Cohen-Arazi's avatar

did you have anything w/ result_of, invoke and invoke_result ? if not it's a suggestion :)

Expand full comment
Raaka's avatar

It has alway been very counter-intuitive to me that when you write a custom lambda (in this case left.size() > right.size()) for priority_queue, it pops out smaller elements first. I always have to remind myself “It’s the other way around”. I think I even came up with a mental picture to memorize that.

Do you have a better way to remember this? Or a technical detail that I couldn’t find.

Expand full comment
2 more comments...

No posts