Adds enumerable to an enumerable
        :param enumerable: An iterable object
        :return: new Enumerable object
11333
def concat(self, enumerable):
        
        if not isinstance(enumerable, Enumerable):
            raise TypeError(
                u"enumerable argument must be an instance of Enumerable"
            )
        return Enumerable(itertools.chain(self._data, enumerable.data))
916272
def compose(*enumerables)
      res=[]
      enumerables.map(&:size).max.times do
        tupla=[]
        for enumerable in enumerables
          tupla << enumerable.shift
        end
        res << (block_given? ? yield(tupla) : tupla)
      end
      res
    end
400376
def _serialize_iterable(obj):
    
    if isinstance(obj, (tuple, set)):
        # make a tuple assignable by casting it to list
        obj = list(obj)
    for item in obj:
        obj[obj.index(item)] = serialize_obj(item)
    return obj
881564
public static <T> List<T> list(boolean isLinked, Enumeration<T> enumration) {
		final List<T> list = list(isLinked);
		if (null != enumration) {
			while (enumration.hasMoreElements()) {
				list.add(enumration.nextElement());
			}
		}
		return list;
	}
829629
public static <T> C.List<T> toList(Iterable<? extends T> iterable) {
        if (iterable instanceof Collection) {
            return toList((Collection<T>) iterable);
        }
        ListBuilder<T> lb = new ListBuilder<T>(10);
        for (T t : iterable) {
            lb.add(t);
        }
        return lb.toList();
    }
563176
def extend(self, *keys, **kwargs):
        
        this = copy.deepcopy(self)

        value_type = kwargs.get('value_type', EnumValue)

        if not keys:
            raise EnumEmptyError()

        keys = tuple(keys)
        values = [None] * len(keys)

        for i, key in enumerate(keys):
            value = value_type(this, i, key)
            values[i] = value
            try:
                super(Enum, this).__setattr__(key, value)
            except TypeError:
                raise EnumBadKeyError(key)

        this.__dict__['_keys'] = this.__dict__['_keys'] + keys
        this.__dict__['_values'] += values

        return this
559077
def typecast_enumerator(enumerator)
        if enumerator.is_a?(Array)
          enumerator.flatten!
          enumerator.map! {|value| typecast_enumerator(value)}
          enumerator
        else
          enumerator.is_a?(Symbol) ? enumerator.to_s : enumerator
        end
      end
246031
public int addAll(Iterable<? extends KTypeCursor<? extends KType>> iterable) {
    int size = 0;
    for (KTypeCursor<? extends KType> cursor : iterable) {
      add(cursor.value);
      size++;
    }
    return size;
  }
793473
def degenerate(enumerable):
    '''
    
    '''
    if (isinstance(enumerable, xrange) or
        inspect.isgeneratorfunction(enumerable) or
        inspect.isgenerator(enumerable)):
        return list(enumerable)
    return enumerable
536811
function addEnumerable (props) {

    return {

        to: function (object) {

            var keys = Object.keys(props);
            keys.forEach(function (key) {

                Object.defineProperty(object, key, {
                    value: props[key],
                    enumerable: true,
                });

            });

        },

    };

}
206355
def enumeration_to_list(enm):
    
    result = []
    while javabridge.call(enm, "hasMoreElements", "()Z"):
        result.append(javabridge.call(enm, "nextElement", "()Ljava/lang/Object;"))
    return result
1227971
def make_iterable(obj, default=None):
    
    if obj is None:
        return default or []
    if isinstance(obj, (compat.string_types, compat.integer_types)):
        return [obj]
    return obj
1040216
public static @Nonnull <T> Iterable<T> enumerationToIterable(@Nullable Enumeration<T> enumeration) {
        if (enumeration == null) {
            return Collections.emptyList();
        }

        return () -> new Iterator<T>() {
            @Override
            public boolean hasNext() {
                return enumeration.hasMoreElements();
            }

            @Override
            public T next() {
                return enumeration.nextElement();
            }
        };
    }
669564
def union(self, enumerable, key=lambda x: x):
        
        if not isinstance(enumerable, Enumerable3):
            raise TypeError(
                u"enumerable parameter must be an instance of Enumerable")
        if self.count() == 0:
            return enumerable
        if enumerable.count() == 0:
            return self
        return self.concat(enumerable).distinct(key)
941088
def enum(**enums):
    
    # Enum values must be hashable to support reverse lookup.
    if not all(isinstance(val, collections.Hashable) for val in _values(enums)):
        raise EnumConstructionException('All enum values must be hashable.')

    # Cheating by maintaining a copy of original dict for iteration b/c iterators are hard.
    # It must be a deepcopy because new.classobj() modifies the original.
    en = copy.deepcopy(enums)
    e = type('Enum', (_EnumMethods,), dict((k, v) for k, v in _items(en)))

    try:
        e.choices = [(v, k) for k, v in sorted(_items(enums), key=itemgetter(1))]  # DEPRECATED
    except TypeError:
        pass
    e.get_id_by_label = e.__dict__.get
    e.get_label_by_id = dict((v, k) for (k, v) in _items(enums)).get

    return e
1166230
def AddIndex(node, index=None):
  
  if isinstance(node, list):
    for i, item in enumerate(node):
      AddIndex(item, index=i)
  elif isinstance(node, dict):
    if index is not None:
      node['index'] = index
    for key in node:
      AddIndex(node[key])
210266
def extend(self, iterable):
        
        with self.lock:
            for item in iterable:
                self.append(item)