Fingerprint ID: | 0x53455453 |
---|

New in version 0.5-rc2.

This fingerprint, from RC/Funge-98, implements set operations. It provides the following commands:

`A`:*set*^{A}*value*—*(set∪{value})*^{A}- Adds
*value*to the*set*. If there is*value*in the*set*, it will do nothing. `C`:*set*^{A}—*set*^{A}*len*- Pushes the size of the
*set*. `D`:*set*^{A}—*set*^{A}*set*^{A}- Duplicates the set.
`G`:*delta*^{v}*source*^{v}—*set*^{A}- Reads the set from the Funge space, starting from
*source*with given*delta*. The set is retrieved in the stack order: the cell at*source*should contain the number of items. Reflects if the stored set is invalid. `I`:*a*^{A}*b*^{A}—*(a∩b)*^{A}- Pushes the intersection of two sets
*a*and*b*. `M`:*set*^{A}*value*—*result*- Pushes 1 if
*value*is in the*set*, or 0 otherwise. `P`:*set*^{A}—*set*^{A}- Prints the
*set*to the standard output. `R`:*set*^{A}*value*—*(set-{value})*^{A}- Removes
*value*from the*set*. If there is no*value*in the*set*, it will do nothing. `S`:*a*^{A}*b*^{A}—*(a-b)*^{A}- Pushes the difference of two sets
*a*and*b*. `U`:*a*^{A}*b*^{A}—*(a∪b)*^{A}- Pushes the union of two sets
*a*and*b*. `W`:*set*^{A}*delta*^{v}*dest*^{v}—*set*^{A}- Writes the set to the Funge space, starting from
*dest*with given*delta*. The set is stored in the stack order: the cell at*dest*will contain the number of items. `X`:*a*^{A}*b*^{A}—*b*^{A}*a*^{A}- Exchanges two sets
*a*and*b*in the top of the stack. `Z`:*set*^{A}—- Pops and discards the
*set*in the top of the stack.

All commands reflect if given set is invalid: stack underflow has been occurred, the size of set is negative, or there is duplicates in the set.