Collection
extension Collection
-
Declaration
Swift
public func grouped<Key>(by grouping: (Element) -> Key) -> [Key : [Element]] where Key : Hashable
-
Returns
nil
if collection is emptyDeclaration
Swift
var nilIfEmpty: Self? { get }