throw new IllegalStateException(L.l("neither arg is an array"));
env.error(L.l("neither argument to implode is an array: {0}, {1}", glueV.getClass().getName(), piecesV.getClass().getName()));  return BooleanValue.FALSE;
  public static Value implode(Env env,                              Value glueV,                              Value piecesV)    throws Throwable  {    String glue;    ArrayValue pieces;    if (piecesV instanceof ArrayValue) {      pieces = (ArrayValue) piecesV;      glue = glueV.toString();    }    else if (glueV instanceof ArrayValue) {      pieces = (ArrayValue) glueV;      glue = piecesV.toString();    }    else {      // XXX: handled wrong?      throw new IllegalStateException(L.l("neither arg is an array"));    }    StringBuilder sb = new StringBuilder();    boolean isFirst = true;    for (Map.Entry<Value,Value> entry : pieces.entrySet()) {      if (! isFirst)        sb.append(glue);      isFirst = false;      sb.append(entry.getValue().toString());    }    return new StringValue(sb.toString());  }