MutableCollection

extension MutableCollection where Self: BidirectionalCollection

Available where Self: BidirectionalCollection

  • Declaration

    Swift

    public func rotated(by amount: Int) -> Self

    Return Value

    A mutable and bidirectional collection with its elements rotated by the given amount.

  • Rotates the elements contained herein by the given amount.

    Declaration

    Swift

    public mutating func rotate(by amount: Int)