# typename

If*F*is a set filter then

typenameoperates as follows. First,F

*F*is evaluated in the current position to get a set of squares

*X*. If

*X*does not contain exactly one square, then the filter does not match.

Otherwise, the filter returns one-character string denoting the type of the contents of the
square in *X*, one of `R`

, `N`

, `B`

, `Q`

, `K`

, `P`

or `_`

.

For example, one way to check whether the previous move was an underpromotion would be:

typename from=="P" typename to in "RNB"

(This is equivalent to

currentmove ――=♖♗♘

# Examples

`typename`

is used in babson3.cql as well as horizontallysymmetric.cql, which finds this study:
(found from CQL file: horizontallysymmetric.cql)