Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on programming.dev

Value and Type parameter packs in Swift explained with examples

cross-posted from: https://programming.dev/post/3558087

Type parameter packs and value parameter packs allow you to write a generic function that accepts an arbitrary number of arguments with distinct types. As a result of SE-393, SE-398, and SE-399, you can use this new feature from Swift 5.9.

Value and Type parameter packs in Swift explained with exampleshttps://www.avanderlee.com/swift/value-and-type-parameter-packs/?Open linkView original on programming.dev
4

No replies yet

No comments on the original post yet.
Value and Type parameter packs in Swift explained with examples | Spyke