Poking around Map.withDefault, I couldn’t figure out where “get” is defined. Although default seems to pretty clearly not memoize1, it seems like some implementations of “get” could memoize behind the scenes.
Basically, what I want to know is, if I have a computation that I want to only have to do once, will a map with a default do it many times, or only once?
Not a problem. I’ve been doing a very similar trick for a long time.