I have a sequence of integers, and I need to extract a subsequence of its high-water marks (
mathworld.wolfram.com/High-WaterMark.html). Is there a simpler/faster way to do that than
HighWaterMarks[s_?VectorQ] := Reap[Block[{max = -∞}, Do[If[n > max, Sow[max = n]], {n, s}]]][[2, 1]];
?