In trying to write a mapping function that applies a function, i.e inc, dec, etc. to the elements of an input vector. The output is a vector with the function applied to each element and an indexing element.
Here is a sample of what I'm trying to input: Input 1: [+ [[1 2] [3 4 5]] 2]
Output1: [[2 2] [3 4]] [[5 4] [6 6] [7 8]]]
Input 2: [+ [1 2 3 4 5]]
Output 2: [[2] [4] [6] [8] [10]]
Symbolically: Input 2: [+ [a b c d e]]
Output 2: [[1+a] [2+b] [3+c] [4+d] [5+e]]
Input 3: [Plus, [[[[[1]]]]]]
Output 3: [[[[[[1+1]]]]] (would output 2 but I wrote out the operation)
Input 4: [Plus [[[[[1]]]]] 2]\
Output 4: [[1+[[[1]]]+[1 1]]]