Swift 5 Flatmap Wtih клавиатура

func flatMap<T>(_ keyPath: KeyPath<Element, [T]>) -> [T] {
    return self.flatMap { $0[keyPath: keyPath] }
}

let dependentItems = item.dependencies.flatMap(\.items)
Old-fashioned Osprey