I wrote a program, that finds unique item from the list and returns the list, problem - it doesn't return the list !!!!
;; checks if the items is atom(define atom? (lambda (x) (and (not (pair? x)) (not (null? x)))));; to store unique items(define uniqueItems '())(define recursive_search (lambda (myList) (cond ((null? myList) #t) ((atom? (car myList)) (if (eq? (memq (car myList) uniqueItems ) #f) (set! uniqueItems (cons (car myList) uniqueItems )) (extractUniqueAtoms_recurse (cdr myList)) ) ) ((list? (car mylist)) (recursive_search (car myList)) (recursive_search (cdr myList))))))
Thanks !
[Edited by - Zahlman on October 28, 2010 7:33:37 AM]