Skip to main content

Generic Repository protocol + memory implementation

Challenge on lesson: Checkpoint: Typing

Implement Repository(Protocol[T]), MemoryRepository(Generic[T]) (key_fn constructor; first-add-wins on duplicate keys), and seed(repo, users).

Difficulty: advanced

Back to lesson: Checkpoint: Typing