Some key methods to know:

  • map: maps a set of iterators to a closure.
  • filter: keeps elements with a closure that evaluates to true.
  • all: checks if all elements in an iterator meets a certain condition, returns bool. If it meets any false, it’ll stop immediately.
  • count: counts the number of elements associated with a set of iterators.
  • collect: aggregates the iterator values into a single data structure (i.e., a vector or hash map).
  • sum: takes a numerical sum.
  • fold: accumulates values across a