GBA003/DeltaFeatures/Extensions/Collection+Optionals.swift
2024-05-30 10:22:15 +08:00

20 lines
411 B
Swift

//
// Collection+Optionals.swift
// DeltaFeatures
//
// Created by Riley Testut on 4/12/23.
// Copyright © 2023 Riley Testut. All rights reserved.
//
import Foundation
extension Collection
{
func appendingNil() -> [Element] where Element: OptionalProtocol, Element.Wrapped: LocalizedOptionValue
{
var values = Array(self)
values.append(Element.none)
return values
}
}