Created
October 2, 2021 15:08
-
-
Save huntercmeyer/e83eba6959d52db16e697f63dfd5b7b4 to your computer and use it in GitHub Desktop.
This file contains 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
import Foundation | |
extension Dictionary { | |
func firstValue(where predicate: (Key, Value) -> Bool) -> Value? { | |
return self.first(where: predicate)?.value | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment