arrayOp
Perform array (vector) operations and store the result in res. Operand types and operations are passed as template arguments in Reverse Polish Notation (RPN).
Operands can be slices or scalar types. The element types of all slices and all scalar types must be implicitly convertible to T.
Operations are encoded as strings, e.g. `"+"`, `"%"`, `"*="`. Unary operations are prefixed with "u", e.g. "u-", "u~". Only the last operation can and must be an assignment (`"="`) or op-assignment ("op=").
All slice operands must have the same length as the result slice.
Parameters
Args | operand types and operations in RPN |
res | the slice in which to store the results |
args | operand values |
Returns
the slice containing the result