082267_lesson7

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

Info icon This 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.
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern