{keep '1..50', square} runs a sequence in keep mode: every value is held against the named type, and only the members stay - here 1 4 9 16 25 36 49. It is the same run as {sequence '1..50', keep, square}, with the play as the tag name; {remove} is its inverse, {flag} marks instead of filtering, and {make} transforms.

The values can come from a range, from a stored sequence ({keep primes, palindrome}), or from nowhere in particular: {keep palindrome, from=100, rows=5} offers the numbers from 100 upward and keeps the first five palindromes - 101 111 121 131 141. Because filtering happens while the list is built, rows counts the values kept, not the candidates offered. The prefix form {keep:prime from=10, rows=4} names the type in the tag; it takes no range parameter - bound it with from, to and rows. A store is named bare, not quoted.

The current value is {$sequence}. Actions written after the type work on the kept values: {keep '1..20', prime, sum} is 77.