0

I am trying to use the LanguageExt library of C#. I wanted to know how to "Stop" filtering after the first predicate turns true in a set of objects.

Example -

  1. HashMap with <Predicate, Function>

  2. Filter through HashMap to find the FIRST element which returns true. // This is where I do not know how to stop processing predicates after the first predicate turns true.

  3. Map to something and continue working on the element

zooes
  • 1,280
  • 3
  • 15
  • 21

0 Answers0