Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Spot the bug
/
Swift
/
Generics
Spot the bug in the smallest helper
from Generics
Swift 6.3.3
beginner
4 min
1 issue to find
Find why this generic function cannot call `min()`.
swift
Copy
func
smallest
<
Value
>
(
_
values
: [
Value
])
->
Value
?
{
values.
min
()
}
Reveal
Copy code
Open in playground
Ask AI about this kata
Report an error
previous kata
What does `where Left.Element == Right.Element` require?
Quiz
A new version is available
Reload