Go Generics Checkpoint

Type sets, underlying types, and practical generic API design.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. Given `type UserID int`, which constraint accepts UserID while allowing integer operations?

Select one answer.

2. A caller has `type Rows []Row`. Which helper shape can return that same defined slice type?

Select one answer.

3. Stable first-seen dedupe sees rows (key=5,value=A), (key=2,value=B), (key=5,value=C). What should it retain?

Select one answer.

4. For keys stored directly in a generic Go map, what constraint permits equality and map-key use?
Join Discord