๐พ ็จๅผ๏ผ replit
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// โ Collection + .lengthsOfElements โ
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
extension Collection where Element: Collection {
/// lengths (element.count) of elements
/// ```
/// [[1,2], [1,2,3]].lengthsOfElements == [2, 3]
/// ```
public var lengthsOfElements: [Int] {
return map { $0.count }
}
}