Collection

public extension Collection where Index == Int
public extension Collection where Self: Occupiable

Available where Index == Int

  • Splits array into slices of specified size

    Declaration

    Swift

    func splittedArray(splitSize: Int) -> [[Element]]

Available where Self: Occupiable

  • Property equal to isNotEmpty property. Added just because in the case of Collection types, ‘hasElements’ is more descriptive name than ‘isNotEmpty’.

    Declaration

    Swift

    var hasElements: Bool { get }