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
/
Quiz
/
Swift
/
Protocol constraints and existentials
Which form fits a returned value whose implementation chooses one hidden concrete type?
from Protocol constraints and existentials
Swift 6.3.3
intermediate
1 min
Which form fits a returned value whose implementation chooses one hidden concrete type?
`-> some P`
`any P`
`<T: P>` chosen independently by the implementation
`Any` followed by `as! P`
Check
Ask AI about this kata
Report an error
previous kata
Who determines the `Item` in a conformance to `protocol Catalog<Item>`?
Quiz
next kata
Only `sortedValues()` compares a container’s elements. Where should `Element: Comparable`…
Quiz
A new version is available
Reload