Skip to content

Instantly share code, notes, and snippets.

@lexuanquynh
Last active July 5, 2022 00:34
Show Gist options
  • Save lexuanquynh/16a71bfc015c9b674f2c70707d53586c to your computer and use it in GitHub Desktop.
Save lexuanquynh/16a71bfc015c9b674f2c70707d53586c to your computer and use it in GitHub Desktop.
let numbers = [3, 7, 4, -2, 9, -6, 10, 1]
let firstNegative = numbers.first(where: { $0 < 0 })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment