Same fringe: Difference between revisions

Content added Content deleted
(→‎{{header|Scheme}}: reword & example)
(→‎{{header|Scheme}}: bug -- reorder avoids (car '()) when trees differ only in length)
Line 1,801: Line 1,801:
(cond
(cond
((and (null? l1) (null? l2)) #t)
((and (null? l1) (null? l2)) #t)
((eq? (entry (car l1)) (entry (car l2)))
((or (null? l1)
(next (ascend l1) (ascend l2)))
(null? l2)
(else #f))))</lang>
(not (eq? (entry (car l1)) (entry (car l2))))) #f)
(else (next (ascend l1) (ascend l2))))))</lang>


{{out}}
{{out}}