Loading

CONTAINSVALUE


maps
Since v1.0.0
Available on all platforms
See also

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.

Signature

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