chickadee » srfi-64 » test-match-nth

test-match-nth n #!optional countprocedure

This evaluates to a stateful predicate: A counter keeps track of how many times it has been called. The predicate matches the n'th time it is called (where 1 is the first time), and the next (- count 1) times, where count defaults to 1.