Search found 1 match
- Sat Nov 22, 2014 1:43 pm
- Forum: Scheme
- Topic: how to find predecessor in the tree
- Replies: 0
- Views: 14752
how to find predecessor in the tree
Hello, Could you help me with a function, I need to find the predecessor in the tree, but my function always returns an empty list, (define (predecessor element tree) (cond ((null? tree) (node tree) ) ; If the tree is null result is the needed element ((> element (node tree)) (mem element (right-bra...