Converts a regular JS array of strings to an AST node that
represents that array.
@param {Array} ary
@param {Node} an AST node that represents an array of strings.
502126
function toAstArray(ary) {
        var output = [
            'array',
            []
        ],
        i, item;

        for (i = 0; (item = ary[i]); i++) {
            output[1].push([
                'string',
                item
            ]);
        }

        return output;
    }
454031
function inArray(src, find, findByKey) {
    if (src.indexOf && !findByKey) {
        return src.indexOf(find);
    } else {
        var i = 0;
        while (i < src.length) {
            if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {
                return i;
            }
            i++;
        }
        return -1;
    }
}
836864
function toArray(obj) {
  var a, arr = [];
  for (a in obj) {
    arr.push(obj[a]);
  }
  return arr;
}
1020811
function (ary, items) {
/*Line 144 - 'AtomBindingHelper.js' */        var ae = new AtomEnumerator(items);
/*Line 145 - 'AtomBindingHelper.js' */        while (ae.next()) {
/*Line 146 - 'AtomBindingHelper.js' */            AtomBinder.addItem(ary, ae.current());
/*Line 147 - 'AtomBindingHelper.js' */        }
/*Line 148 - 'AtomBindingHelper.js' */    }
360104
function(args){
			var arr = [];
			each(args, function(i, str){arr[i] = str});
			return arr;
		}
1371872
def make_array_access(id_, lineno, arglist):
    
    return symbols.ARRAYACCESS.make_node(id_, arglist, lineno)
975810
function arrayToString( ... args ) {
	if ( ! args.length ) { return '/' + this.map( mapValue ).join( '/' ) ; }
	return '/' +  Array.prototype.slice.call( this , ... args ).map( mapValue )
		.join( '/' ) ;
}
1304990
function toArray(obj) {
	if (Array.isArray(obj)) return obj;
	var a = [];
	a.push(obj);
	return a;
}
288056
function ast (tokens) {
  let token = tokens[0]

  const state = {
    content: []
  }

  let current = state
  let active = current
  const stack = []
  let lineStackSize = 0 // when inline entities are used this gets incremented so that when you
  // go onto a new line we can go back to the correct location in the stack

  const l = tokens.length
  let i = 0
  let absoluteIndent = 0
  let currentIndent = 0
  let extraIndent = 0
  let prevWasType = false
  let nextParamsAreEscaped = false
  let prevParamsWereEscaped = false
  const emptyLines = []
  let handlingInlineContent = false // true when between an START_INLINE_CONTENT and END_INLINE_CONTENT
  /*
    notCreatedInlineContent
    This is true when the inline content entry has not yet been created in the parsed
    content (which is done for the first content encountered between START_INLINE_CONTENT
    and END_INLINE_CONTENT)
  */
  let notCreatedInlineContent = true

  while (i < l) {
    token = tokens[i]
    if (token.type === 'TYPE') {
      if (token.value === '') {
        nextParamsAreEscaped = true
      } else {
        prevWasType = true

        active = {
          type: token.value,
          params: [],
          content: []
        }

        while (emptyLines.length) {
          current.content.push(emptyLines.pop())
        }

        current.content.push(active)
      }
    } else if (token.type === 'PARAMS') {
      if (nextParamsAreEscaped) {
        if (active.content.length > 0) {
          active.content[active.content.length - 1] += token.value
        } else {
          active.content.push(token.value)
        }
        nextParamsAreEscaped = false
        prevParamsWereEscaped = true
      } else {
        active.params = splitParams(token.value)
      }
    } else if (token.type === 'CONTENT') {
      if (prevParamsWereEscaped) {
        active.content[active.content.length - 1] += token.value
        prevParamsWereEscaped = false
      } else if (token.value === '') {
        emptyLines.push(token.value)
      } else {
        while (emptyLines.length) {
          current.content.push(emptyLines.pop())
        }

        prevWasType = false

        if (handlingInlineContent) {
          if (notCreatedInlineContent) {
            current.content.push(token.value)
            notCreatedInlineContent = false
          } else {
            current.content[current.content.length - 1] += ' ' + token.value
          }
        } else {
          let ex = ''
          for (let k = 0; k < extraIndent; k++) {
            ex += ' '
          }
          current.content.push(ex + token.value)
        }
      }
    } else if (token.type === 'EMPTY_CONTENT') {
      emptyLines.push(token.value)
    } else if (token.type === 'START_SAME_LINE_CONTENT') {
      lineStackSize++
      stack.push(current)
      current = active
    } else if (token.type === 'END_SAME_LINE_CONTENT') {
      // keep the active as it is, even though the current is being droped back a couple of levels
      // this is so that you can do @one: @two: @three\n @four, and have @four be a child of @three (not @one)
      active = current

      // drop back down the stack until you reach where we were at the start of the line
      while (lineStackSize) {
        current = stack.pop()
        lineStackSize--
      }
      prevWasType = true
    } else if (token.type === 'START_INLINE_CONTENT') {
      handlingInlineContent = true
      notCreatedInlineContent = true
      lineStackSize++
      stack.push(current)
      current = active
    } else if (token.type === 'END_INLINE_CONTENT') {
      handlingInlineContent = false
      active = current
      current = stack.pop()
      lineStackSize--
      prevWasType = true
    } else if (token.type === 'INDENT') {
      stack.push(current)
      current = active
      absoluteIndent += token.value

      if (prevWasType) {
        currentIndent = absoluteIndent
      }

      extraIndent = absoluteIndent - currentIndent
    } else if (token.type === 'DEDENT') {
      current = stack.pop()
      active = current
      absoluteIndent -= token.value

      if (extraIndent > 0) {
        extraIndent -= token.value
      } else {
        currentIndent = absoluteIndent
      }
    }
    i++
  }

  return state.content
}
915782
def to_a
      ary = []
      node = @first_leaf
      while node do
        ary += node.values
        node = node.next_sibling
      end

      ary
    end
1000853
function arrayToString(a) {
  for (var i = 0, il = a.length, s = ''; i < il; i++) {
    s += a[i][0]

    if (a[i][1] != null) {
      s += a[i][1]

      if (a[i][2] != null) {
        s += ' '
        s += a[i][2]

        if (a[i][3] != null) {
          s += ' '
          s += a[i][3]
          s += ' '
          s += a[i][4]

          if (a[i][5] != null) {
            s += ' '
            s += a[i][5]
            s += ' '
            s += a[i][6]

            if (a[i][7] != null) {
              s += ' '
              s += a[i][7]
            }
          }
        }
      }
    }
  }

  return s + ' '
}
1022708
function push(arr) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    arr = arr.concat(flatten.apply(void 0, args));
    return {
        array: arr,
        val: arr.length
    };
}
374532
function (ary) {
  var shuffled = [];
  ary.reduce(function (acc, v) {
    var r = range(0, acc);
    shuffled[acc] = shuffled[r];
    shuffled[r] = v;
    return acc + 1;
  }, 0);
  return shuffled;
}
567062
function arrayToList(array) {
  if(isArray(array)) {
    return List.fromArray(array)
  }
  else if(isFunction(array)) {
    return function(x) {
      const g = array(x)

      if(!isArray(g)) {
        throw new TypeError('arrayToList: Array returning function required')
      }

      return List.fromArray(g)
    }
  }

  throw new TypeError('arrayToList: Array or Array returning function required')
}
240576
function isArray (arr) {
  return Array.isArray
    ? Array.isArray(arr)
    : Object.prototype.toString.call(arr) === '[object Array]'
}
1094634
function arrset(arr, type) {
      if (arr == null) return null;
      if (typeof arr == 'string') {
        var f = umecob[type](arr);
        if (!f || typeof f != 'function') return null;
        return [f];
      }
      if (arr instanceof Array) {
        var l = arr.length;
        if (l == 0) return [];
        var ret = [];
        for (var i=0; i < l; i++) {
          var f = umecob[type]( arr[i] );
          if (f && typeof f == 'function') ret.push(f);
        }
        return ret;
      }
      return null;
    }
854602
private void addToArray(JsonNode j) {
        if (j instanceof ArrayNode) {
            for (Iterator<JsonNode> itr = ((ArrayNode) j).elements(); itr.hasNext();) {
                addToArray(itr.next());
            }
        } else {
            ((ArrayNode) node).add(j);
        }
    }