Loading

CONTAINSVALUE

maps

The CONTAINSVALUE function checks if the value element on top of the stack is a value of the map on second position.

The value is consumed, and a boolean is pushed on the stack.

CONTAINSVALUE is available since version 1.0.0.

See also

Signatures

Examples

{ 'foo' 42 'bar' true 'cool' 'always' } 42 CONTAINSVALUE SWAP 3.14 CONTAINSVALUE
{ 'key1' 'foo' 'key2' 'bar' 'key3' 'cool' } 'mymap' STORE <% $mymap 'bar' CONTAINSVALUE SWAP DROP %> //keep only boolean result for conditional test <% 'bar present in values' %> IFT //if then