{flag '1..10', even} runs a sequence in flag mode: every value is tested against the named type and replaced by 1 when it belongs to it and 0 when it does not - here 0 1 0 1 0 1 0 1 0 1. Where {keep} and {remove} filter, {flag} keeps every position, so the flags line up with the original list. It is the same run as {sequence '1..10', flag, even}.

Because the flags are numbers, actions can count with them: {flag '1..20', prime, sum} is 8, the number of primes up to 20. Without a range the candidates run from from upward and rows says how many flags; a stored sequence named bare works as the source too. The prefix form {flag:prime rows=10} names the type in the tag and takes no range.

The current value is {$sequence} - the flag, not the original number. To show both side by side, flag a stored list and pull the store beside it, as in the example.