You’re getting an error because your anonymous function takes two arguments, whereas each tuple is only a single argument.
You can use this as the anonymous function instead:
(x -> x[1] + x[2])
Or simply use sum.
You’re getting an error because your anonymous function takes two arguments, whereas each tuple is only a single argument.
You can use this as the anonymous function instead:
(x -> x[1] + x[2])
Or simply use sum.