Skip to content

Instantly share code, notes, and snippets.

@salmaanahmed
Created January 28, 2019 12:15
Show Gist options
  • Save salmaanahmed/57951c6f8b27d3cdda2ff6080fad29e1 to your computer and use it in GitHub Desktop.
Save salmaanahmed/57951c6f8b27d3cdda2ff6080fad29e1 to your computer and use it in GitHub Desktop.
[1, 2, 3, -1, -2].count(where: { $0 > 0 }) // => 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment