I'm trying to implement "pos+". It is supposed take a list and return each element plus its position.... (7 5 1 4) becomes (7 6 3 7).
Instead, I'm getting ((((NIL . 7) . 6) . 3) . 7)
I don't want a dotted list. How do I solve that? Right now I'm doing it iteratively. I haven't started worrying about how to do it using recursion or mapcar yet.
Yes, this is a homework problem. Therefore, giving me code would be unethical. 😉 😉.
Instead, I'm getting ((((NIL . 7) . 6) . 3) . 7)
I don't want a dotted list. How do I solve that? Right now I'm doing it iteratively. I haven't started worrying about how to do it using recursion or mapcar yet.
Yes, this is a homework problem. Therefore, giving me code would be unethical. 😉 😉.