(define (palindrome list) ;List is passed to his function by user
(reverse-lon list list)) ;List is then sent to another function that
;handles actual palndrome work
(define (reverse-lon alist blist)
(cond
[(null? list) empty]
[else
(append alist (addright (car blist) (reverse (cdr blist))))]))
;Appends original list and reversed list
;calls addright on first element of list
(define (addright elem list) ;@params: first element of list, reverse cdr(list)
(cond
[ (null? list) (cons elem list) ]
[ else
(cons (car list) (addright elem (cdr list)))]))
(palindrome '(I love scheme))