RemoveAt constructor

RemoveAt()

Implementation

RemoveAt()
  : super(
      methodName: "removeAt",
      targetType: .list,
      arity: 1,
      function: (target, _, arguments) {
        if (arguments[0] is! int) {
          throw RuntimeError("RemoveAt index must be an integer.");
        }
        target.removeAt(arguments[0] as int);
        return target.length;
      },
    );