***LANGUAGE IS SCHEME (R5RS)*** In this problem set you will write code for bina
ID: 3603749 • Letter: #
Question
***LANGUAGE IS SCHEME (R5RS)***
In this problem set you will write code for binary trees. Recall the conventions we have adopted in class for maintaining trees. We represent the empty tree with the empty list (); a nonempty tree is represented as a list of three objects (value left-subtree right-subtree) where value is the value stored at the root of the tree, and left-subtree and right-s are the two subtrees. We introduced some standardized functions for maintaining and accessing this structure, which we encourage you to use in your solutions below. ubtree (define (make-tree value left right) (list value left right)) (define (value tree) (car tree)) (define (left tree) (cadr tree)) (define (right tree) (caddr tree))Explanation / Answer
Scheme and Common Lisp are the two principal dialects of the computer programming language Lisp. Unlike Common Lisp, Scheme follows a minimalist design philosophy that specifies a small standard core accompanied by powerful tools for language extension.
Scheme was created during the 1970s at the MIT AI Lab and released by its developers, Guy L. Steele and Gerald Jay Sussman, via a series of memos now known as the Lambda Papers. It was the first dialect of Lisp to choose lexical scope and the first to require implementations to perform tail-call optimization, giving stronger support for functional programming and associated techniques such as recursive algorithms. It was also one of the first programming languages to support first-class continuations. It had a significant influence on the effort that led to the development of Common Lisp.
The Scheme language is standardized in the official IEEE standard and a de facto standard called the Revisedn Report on the Algorithmic Language Scheme (RnRS). The most widely implemented standard is R5RS (1998); a new standard, R6RS, was ratified in 2007. Scheme has a diverse user base due to its compactness and elegance, but its minimalist philosophy has also caused wide divergence between practical implementations, so much that the Scheme Steering Committee calls it "the world's most unportable programming language" and "a family of dialects" rather than a single language
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.