Example #1
0
 /**
  * This method evaluates whether the left operand is equal to the right operand.
  *
  * @access public
  * @static
  * @param IHashSet\Type $xs                                 the left operand
  * @param Core\Type $ys                                     the right operand
  * @return IBool\Type                                       whether the left operand is equal
  *                                                          to the right operand
  */
 public static function eq(IHashSet\Type $xs, Core\Type $ys) : IBool\Type
 {
     // ==
     $type = $xs->__typeOf();
     if ($ys !== null && $ys instanceof $type) {
         if (IInt32\Module::eq($xs->size(), $ys->size())->unbox()) {
             return IHashSet\Module::all($xs, function (Core\Type $x, IInt32\Type $i) use($ys) {
                 return $ys->hasItem($x);
             });
         }
     }
     return IBool\Type::false();
 }