Search found 1 match

by V_Suri
Tue Nov 09, 2010 3:52 pm
Forum: Common Lisp
Topic: Recursion Question
Replies: 2
Views: 3358

Recursion Question

I need to use recursion to print out each element of a list twice. ex. rdouble'(1 2 3) would return (1 1 2 2 3 3) also rdouble'(1 (2 3) 4) would return (1 1 (2 2 3 3) 4 4) so far I have this function (defun rdouble (struct) (cond ((atom struct) struct) (t (cons (rdouble (car struct)) (cons (car stru...