code: public static Measurement first(Iterable<Measurement> ms, Predicate<Measurement> p) {
      Iterator<Measurement> it = filter(ms, p).iterator();
      return it.hasNext() ? it.next() : null;
    }
docs: Returns the first measurement that matches the predicate.
  
  @param ms
  A set of measurements.
  @param p
  Predicate to use for selecting values.
  @return
  Measurement or null if no matches are found.