Closed lukeredpath closed 10 months ago
Updated the signature to be a PartialCaseKeyPath which is all that is required for this function to work.
PartialCaseKeyPath
Makes it possible to write algorithms that operate on a collection of case key paths for a given type, for example:
extension CasePathable { func isOneOf<CaseKeyPaths: Sequence>(_ keyPaths: CaseKeyPaths) -> Bool where CaseKeyPaths.Element == PartialCaseKeyPath<Self> { keyPaths.contains(where: { self.is($0) }) } }
Updated the signature to be a
PartialCaseKeyPath
which is all that is required for this function to work.Makes it possible to write algorithms that operate on a collection of case key paths for a given type, for example: