I have the following variadic function (define doSomething (lambda (x . rest) .... The function is called by using numbers, for example: (doSomething 1 2 3 4 5) (so with that call x would be 1 and rest would be (2 3 4 5)).
When I try to recursively call the function and put the second number (2) as x and rest as (3 4 5) I somehow receive the rest parameter as a list of list: ((3 4 5)).
This is how I currently try to call the function again:
(+ x (doSomething (car rest) (cdr rest)))
It is worth mentioning that I'm using Pretty Big. Please advise, thanks.