3 ms·
To expand on this: the "unit" here represents the number of possible values that can be returned. The confusion is probably because "empty" can mean two things
by akdas 2y ago
To expand on this: the "unit" here represents the number of possible values that can be returned.
The confusion is probably because "empty" can mean two things:
- What's inside the returned value. That may be why the parent suggested empty for the unit type. But that's now what "unit" means in the common parlance.
- How many possible values can be returned. Never returning means the function has zero possible return values.