Skip to content

Instantly share code, notes, and snippets.

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