# How do I use the individual members of variadic data?

**URL:** <https://forums.swift.org/t/how-do-i-use-the-individual-members-of-variadic-data/71654>\
**Category:** Using Swift\
**Tags:** tuple, variadic-generics\
**Created:** [May 7, 2024, 12:08am UTC](https://forums.swift.org/t/how-do-i-use-the-individual-members-of-variadic-data/71654 "2024-05-07T00:08:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTMacUser](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ctmacuser/32/1802_2.png) [@CTMacUser](https://forums.swift.org/u/CTMacUser)\
**Post date:** [May 7, 2024, 12:08am UTC](https://forums.swift.org/t/how-do-i-use-the-individual-members-of-variadic-data/71654/1 "2024-05-07T00:08:18Z")

</div>

Lapsed coder. Read about variadic generics finally getting into the language. Tried out an example in a playground, couldn't figure out how to make it work.

```swift
struct MyType<First: Comparable, Second: Comparable, each Suffix: Comparable>
{
  typealias Element = (First, Second, repeat each Suffix)

  typealias RotatedElement = (Second, repeat each Suffix, First)

  static func rotate(e: Element) -> RotatedElement {
    // What goes here? "repeat each e.2" didn't seem to work.
    return (e.1, ???, e.0)
  }
  static func rotateBack(e: RotatedElement) -> Element {
    // The last term is just a placeholder. The question
    // is how do I reference the last element of the
    // incoming tuple, to explicitly reference it into the
    // first element of the outgoing tuple?
    return (e.???, e.0, repeat each e.1)
  }
}

```

Is there any sort of `#variadicCount(???)` operator?

There was some sort of function hack, but how could I explode the tuple's middle members to separate parameters?

I first tried on [Reddit](https://www.reddit.com/r/swift/comments/1cl9ec2/question_about_variadic_generics_from_a_lapsed/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button).
