@@ -0,0 +1,1074 @@
+package io.warp10.script;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Apublic abstract class ElementOrListStackFunction extends NamedWarpScriptFunction implements WarpScriptStackFunction %7B%0A%0A  @FunctionalInterface%0A  public interface ElementStackFunction %7B%0A    Object applyOnElement(Object element) throws WarpScriptException;%0A  %7D%0A%0A  public abstract ElementStackFunction generateFunction(WarpScriptStack stack) throws WarpScriptException;%0A%0A  public ElementOrListStackFunction(String name) %7B%0A    super(name);%0A  %7D%0A%0A  public Object apply(WarpScriptStack stack) throws WarpScriptException %7B%0A    ElementStackFunction function = generateFunction(stack);%0A%0A    Object o = stack.pop();%0A%0A    if (o instanceof List) %7B%0A      List list = (List) o;%0A      ArrayList%3CObject%3E result = new ArrayList%3CObject%3E(list.size());%0A%0A      for (Object element: list) %7B%0A        result.add(function.applyOnElement(element));%0A      %7D%0A%0A      stack.push(result);%0A    %7D else %7B%0A      stack.push(function.applyOnElement(o));%0A    %7D%0A%0A    return stack;%0A  %7D%0A%7D%0A%0A

Add the ElementOrListStackFunction class to replace GTSStackFunction