Skip to content

Instantly share code, notes, and snippets.

@gonzalonunez
Created March 29, 2023 01:58
Show Gist options
  • Save gonzalonunez/68d959d16bbb34467302267aba7dcd9e to your computer and use it in GitHub Desktop.
Save gonzalonunez/68d959d16bbb34467302267aba7dcd9e to your computer and use it in GitHub Desktop.
DoccGPT Diff
/// 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] }
}
@gonzalonunez
Copy link
Author

Pretty remarkable diff left by https://github.com/gonzalonunez/docc-gpt. Wanted to save it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment