// structList : type property를 가지고 있는 struct list structList.reduce(into: [:]) { (dict, struct) in dict[struct.type, default: 0] += 1 }
// 튜플 담긴 리스트 반환 dict.sorted { $0.1 > $1.1 }