aimer2 = (course, horizontal = 0, depth = 0, aim = 0) => {
const switcher = ({
"forward": function (amount) {horizontal += amount; depth += amount * aim;},
"up": function (amount) {aim -= amount;},
"down": function (amount) {aim += amount;},
});
course.forEach(({direction, amount}) => (switcher[direction])(amount));
return depth * horizontal;
}