Skip to main content

Map SuperMap

rascal-0.40.17

Synopsis

Supermap operator on map values.

Syntax

Exp₁ >= Exp₂

Types

Exp₁Exp₂Exp₁ >= Exp₂
map[TK₁,TV₂]map[TK₂, TV₂]bool

Description

Yields true if all key/value pairs in the map value of Exp₂ occur in the map value Exp₁ or the values of Exp₁ and Exp₂ are equal, and false otherwise.

Examples

rascal>("pear": 2, "apple": 1) >= ("apple": 1, "pear": 2);
bool: true
rascal>("pear": 2, "apple": 1, "banana" : 3) >= ("apple": 1, "pear": 2);
bool: true
rascal>("apple": 1, "banana" : 3) >= ("apple": 1, "pear": 2);
bool: false