082267_lesson7

082267_lesson7 - 15. What are the differences between CONS,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 367 Programming Languages Lesson 7 Review Questions Chapter 15 5. What are the two forms of DEFINE? The simplest form is (DEFINE symbol expression) which is used to bind a name to the value of an expression. The other form is (DEFINE (function_name parameters) (expression)) which is used to bind a lambda expression to a name. 9. In what ways are COMMON LISP and Scheme opposite? Schemes use of static scoping make it smaller while COMMON LISPs need for backward compatibility with earlier LISP iterations caused it to be very large. Schemes size makes it more usable in smaller collge environments while LISP is more often found in large commercial operations. 11. What are three ways that ML is significantly different from Scheme? 1. ML is a strongly typed language and scheme is essentially typeless. 2. ML uses type inferencing, which means that variables need not be declared. 3. The type of every variable and expression can be determined at compile time.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15. What are the differences between CONS, LIST, and APPEND? CONS builds a list from either atoms or other lists, APPEND constructs a new list by combining 2 other lists together, and LIST tests whether or not a single argument is a list or something else. Chapter 16 5. What are the forms of Horn clauses? Horn clauses can only be in one of two forms. First, they have a single atomic preposition on the left side or second, they have an empty left side. Horn clauses with left sides are called headed horn clauses. 7. What are the three forms of a prolog term? The three forms of a prolog term are 1. a constant string of letters, digits, and underscores beginning with a lowercase letter,2. a variable of any string of letters, digits, and underscores beginning with an uppercase letter, or 3. a structure representing atomic proposition. The general form is consequence :- antecedent_expession...
View Full Document

This note was uploaded on 01/19/2011 for the course CS 367 taught by Professor Unkown during the Spring '09 term at Grantham.

Page1 / 2

082267_lesson7 - 15. What are the differences between CONS,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online