Skip to content

Instantly share code, notes, and snippets.

@grauwoelfchen
Last active December 18, 2015 10:19
Show Gist options
  • Save grauwoelfchen/5767831 to your computer and use it in GitHub Desktop.
Save grauwoelfchen/5767831 to your computer and use it in GitHub Desktop.
(define t-empty #f)
(define t-value car)
(define t-left cadr)
(define t-right caddr)
(define (t-node value l-node r-node)
(list value l-node r-node))
(define (t-empty? node)
(equal? node t-empty))
@grauwoelfchen
Copy link
Author

#||
(define (t-empty? node)
(if (equal? node t-empty)
#t
(and (equal? (t-left node) t-empty)
(equal? (t-right node) t-empty))))
||#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment