Std.EnumMap.get
1 declaration
fn
get: &Std.EnumMap.EnumMap[K, V] -> K -> VThis is a callable function.
What it does
The value stored under a key.
Total for any key the domain holds, which is what this module exists to
give. A key from outside the domain has no value to answer with and no
honest one to invent, so it panics: that is a defect in the caller's own
code — they named the domain — rather than an input a program could receive.
find is the form to reach for when the key came from outside the program.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- & borrows a value for this call instead of moving or copying it.
- Names inside [ ] are type arguments, such as the item type held by a collection.
