๐พ ็จๅผ๏ผ replit
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// โ Collection + .allElementsSameLength โ
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
extension Collection where Element: Collection {
/// all elements (rows) are of the some length
/// ```
/// [[1,2], [3,4]].allElementsSameLength == true
/// ```
public var allElementsSameLength: Bool {
guard !isEmpty else { return true }
return dropFirst().allSatisfy { $0.count == first!.count }
}
}