only array, object now treated as iterable
9690
function isIterable (v) {
  return type.call(v) == OBJECT || type.call(v) == ARRAY
}
483245
def <<(obj)
      if obj.is_a?(Integer)
        push_int(obj)
      elsif obj.is_a?(String)
        append_data(obj)
      elsif obj.is_a?(Array)
        obj.each { |o| self.<< o}
        self
      end
    end
996578
function forEach(object, iterator, thisp) {
    if (object) {
        if (object.forEach) {
            object.forEach(iterator, thisp);
            return;
        }
        //Default implementation
        if (! (iterator instanceof Function)) {
            throw new TypeError('iterator should be a Function');
        }

        var key, length;

        if (isString(object)) {
            length = object.length;
            for (key = 0; key < length; key += 1) {
                iterator.call(thisp, object[key], key, object);
            }
            return;
        }

        for (key in object) {
            if (object.hasOwnProperty(key)) {
                iterator.call(thisp, object[key], key, object);
            }
        }
    }
}
497001
function toIterable(value) {
      if (value == null) {
        return [];
      }
      if (!isArrayLike(value)) {
        return values(value);
      }
      if (lodash.support.unindexedChars && isString(value)) {
        return value.split('');
      }
      return isObject(value) ? value : Object(value);
    }
1311675
function isIterable(was){
		return _.isObject(was) && !_.isFunction(was) && !_.isArray(was);
	}
548847
function eachObj(obj, iteratee, context) {
  for (var key in obj) {
    if (obj.hasOwnProperty(key)) {
      iteratee.call(context || obj, key, obj[key]);
    }
  }
}
795787
public final void addObject(Object object) {
        if (object instanceof Iterable) {
            // Iterable
            for (Object o : (Iterable<?>) object) {
                objects.add(o);
            }
        } else if (object.getClass().isArray()) {
            // Array
            for (Object o : (Object[]) object) {
                objects.add(o);
            }
        } else {
            // Single object
            objects.add(object);
        }
    }
1258151
function all(iterable){
      var C      = getConstructor(this)
        , values = [];
      return new C(function(res, rej){
        forOf(iterable, false, values.push, values);
        var remaining = values.length
          , results   = Array(remaining);
        if(remaining)$.each.call(values, function(promise, index){
          C.resolve(promise).then(function(value){
            results[index] = value;
            --remaining || res(results);
          }, rej);
        });
        else res(results);
      });
    }
339954
function each(obj, cb) {
      if (!obj)
        return;

      if (!Array.isArray(obj) && typeof obj === "object")
        obj = Object.keys(obj);

      obj.forEach(cb);
    }
421280
private static boolean isArrayLike(Object object)
  {
    return object != null && (object.getClass().isArray() || object instanceof Collection);
  }
576970
function (obj, iterator, context) {
    var results = [];
    if (!obj) return results;
    if (Array.prototype.map && obj.map === Array.prototype.map) {
      return obj.map(iterator, context);
    }
    each(obj, function (value, index, list) {
      results[results.length] = iterator.call(context, value, index, list);
    });
    if (obj.length === +obj.length) results.length = obj.length;
    return results;
  }
1009388
function iter(obj, each) {
  if (!obj || typeof obj !== 'object') { return ''; }

  let output = '';
  const keys = Object.keys(obj);
  const length = keys.length;

  for (let i = 0; i < length; i += 1) {
    const key = keys[i];
    output += each(key, i, length, obj[key]);
  }

  return output;
}
603747
public static <T> Object[] toArray(Iterable<T> iterable)
    {
        if (iterable == null)
        {
            throw new NullPointerException();
        }
        if (iterable instanceof Collection)
        {
            return ((Collection<T>) iterable).toArray();
        }
        if (iterable instanceof RichIterable)
        {
            return ((RichIterable<T>) iterable).toArray();
        }
        MutableList<T> result = Lists.mutable.empty();
        Iterate.addAllTo(iterable, result);
        return result.toArray();
    }
1364177
function (arr) {
        if (!_.isArray(arr)) {
            return;
        }

        var obj = {},
            key,
            val,
            i,
            ii;

        for (i = 0, ii = arr.length; i < ii; i += 2) {
            key = arr[i];
            val = arr[i + 1];

            if (_.has(obj, key)) {
                !_.isArray(obj[key]) && (obj[key] = [obj[key]]);
                obj[key].push(val);
            }
            else {
                obj[key] = val;
            }
        }

        return obj;
    }
533903
function removeAll(object, keys) {
  forValueInArray(keys, unset)

  function unset(key) {
    object[key] = undefined
  }
}
1208625
function forEach(iterable, callback) {
    for (var i = 0; i < iterable.length; i++) {
        callback(iterable[i], i);
    }
}
1330144
function iterateArray(array) {
  return ArrayCompiler.compileArray(array.map(function(obj) {
    return iterate(obj);
  }), data);
}