Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    Didn't know about this, seems useful! :D Commented Jun 19, 2014 at 10:20
  • very useful..something new to me..Thanks Commented Jun 19, 2014 at 10:21
  • I am not getting how to use this predicate and pass it in to argument. Can anyone give me demo ? Commented Jun 19, 2014 at 11:51
  • 1
    Still useful and saves lives four years later :D Commented Oct 17, 2018 at 1:21
  • 1
    Should probably be noted that the above solution will return true for an empty list. Commented Jul 13, 2023 at 15:09