Hi, I know if I write my scheme code in the following way and type in (word ‘(a b c)), it will out put the list in the same order. Could you please tell me if there was a way I can print it out in opposite order. Ex- (list ‘c ‘b ‘a). it needs to be the user's input I print out in opposite order. So, I can't call it (reverse '(a b c)). since the user input can be something like '(x y z). Thanks a lot.
(define(word x )
(if(null? x) x
(cons(car x)(word (cdr x)))))
(word '(a b c))
(list 'a 'b 'c)