eqs := [a = b, c = d, e = f]:
map(`+`, eqs, 2);
map(`-`, eqs, 2);
map(`/`, eqs, 2);
[a + 2 = b + 2, c + 2 = d + 2, e + 2 = f + 2]
[a - 2 = b - 2, c - 2 = d - 2, e - 2 = f - 2]
[1 1 1 1 1 1 ]
[- a = - b, - c = - d, - e = - f]
[2 2 2 2 2 2 ]
These work differently
map(`*`, eqs, 2);
map(`^`, eqs, 2);
[2 (a = b), 2 (c = d), 2 (e = f)]
Error, non-algebraic base in a power: a = b
(The first one can be dealt with by applying eval to the output)
Why do not all work the same way?
Edit:
Generic work arounds where arithop is one of: + - / * ^
map(eval@`arithop`, eqs, 2);
map(map@`arithop`, eqs, 2);# Update: Maple 2021 and higher
[seq(i arithop 2, i in eqs)];