I basic have this code where I try to make a list of unique atoms from a list of lists of lists etc but my code doesn't seem to have any effect on the given lists, what could be wrong ? How to fix it?
(define (concatenar2 l1)
(cond
[(null? l1) l1]
[(list? (first l1)) (cons (concatenar2 (first l1)) (concatenar2 (rest l1)))]
[else (cons (first l1) (concatenar2 (rest l1)))]
)
)
(check-equal? (concatenar2 '()) '())
(check-equal? (concatenar2 '((a b c) (d e f g h))) '(a b c d e f g h)) ;; getting the input as a result from the function concatenar2
Also, I would like to avoid using the 'append' method from racket.