Created
March 29, 2023 01:58
-
-
Save gonzalonunez/68d959d16bbb34467302267aba7dcd9e to your computer and use it in GitHub Desktop.
DoccGPT Diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// A prefix operator that negates a `Bool` value from a given `KeyPath`. | |
/// | |
/// - Parameter keyPath: The `KeyPath` to the `Bool` value to be negated. | |
/// | |
/// - Returns: A function that takes an instance of `T` and returns the negated `Bool` value. | |
prefix func !<T>(keyPath: KeyPath<T, Bool>) -> (T) -> Bool { | |
return { !$0[keyPath: keyPath] } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pretty remarkable diff left by https://github.com/gonzalonunez/docc-gpt. Wanted to save it.