This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

tree in-order

2 posts · 1471 views

I have a tree of type (2)
A
/ \
B C
/ \
D E

I have this function which returns my nods in post-order
(defun postordine(l)
(cond
((null l) l)
(t (append (postordine (car (cdr l))) (postordine (car (cdr (cdr l)))) (list(car l))))
)
)


I need to change it for a in-order
any help ? :] or link to some tutorials

Re: tree in-order

Just reorder the arguments to append.