Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

entry API

HashMap's way to insert-or-update a key in one lookup.

map.entry(key) returns an Entry for an occupied or vacant slot; or_insert, or_insert_with, and and_modify update or fill it with a single hash lookup.

Loading interactive…

Examples

  • *tally.entry(drink).or_insert(0) += 1; counts each drink with one lookup, starting a new key at 0.

Read the full section →