;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname interface) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
;; an Operator is (anyof '+ '- '* '/)
(define-struct ainode (op args))
;; an arithmetic expression internal node (AINode)
;; is a (make-ainode Operator (listof AExp))
;; An arithmetic expression (AExp) is either:
;; a Num or
;; a AINode
define-struct binode (op arg1 arg2))
;; a binary arithmetic expression internal node (BINode)
;; is a (make-binode Operator BinExp BinExp)
;; A binary arithmetic expression (BinExp) is either:
;; a Num or
;; a BINode
(define-struct snode (key left right))
;; a SNode is a (make-snode Num SSTree SSTree)
;; a simple search tree (SSTree) is either
;; * '() or
;; * a SNode, where keys in left are less than key, and in right greater.
(define-struct node (key val left right))
;; A binary search tree (BST) is either
;; * '() or
;; * (make-node Nat Any BST BST)...
(define-struct association (key val))
;; An Association is a (make-association Nat Any)
;; a leaf-labelled tree (LLT) is either
;; a Num or
;; a non-empty (listof LLT).