RosettaCodeData/Task/Constrained-genericity/Swift/constrained-genericity-3.swift

3 lines
112 B
Swift
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
func foo<T: Eatable>(x: T) { }
// although in this case this is no more useful than just "func foo(x: Eatable)"