code: function collectUniqNodes(list, func) {
      var result = [];
      var nodeIds = {};
      var currentNodeId;
  
      flexiEach(list, function(value) {
        flexiEach(func(value), function(node) {
          if (!nodeIds[currentNodeId = getNodeId(node)]) {
            result.push(node);
            nodeIds[currentNodeId] = true;
          }
        });
      });
      return result;
    }
docs: collect variant that filters out duplicate nodes from the given list, returns a new array