// as pseudo syntax. func squares<(T: Numeric)...>(of values: T...) -> (T...) { switch values { case (): return () case let (t, ts...): return (t * t, squares(ts)...) } }