<?xml version="1.0" ?>
<CourseItem>
	<create_date type="datetime">
		2006-08-09 11:55:00
	</create_date>
	<title type="str">
		Lisp Essentials
	</title>
	<last_changed type="datetime">
		2006-08-17 14:14:17.044484
	</last_changed>
	<invisible type="bool">
		False
	</invisible>
	<const_repetition type="bool">
		True
	</const_repetition>
	<description type="str">
		
	</description>
	<FlashcardCollection type="collection">
		<Flashcard>
			<create_date type="datetime">
				2006-08-09 11:58:00
			</create_date>
			<explanation type="str">
				- If a list is quoted, evaluation returns the list itself; if it is not quoted, the list is treated as code, and evaluation returns its value.
- &gt; (list '(+ 2 1) (+ 2 1))
- ((+ 2 1) 3)
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				What is a list?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.278895
			</last_changed>
			<answer type="str">
				A list can be either a program or data. E.g.:

- ()
- (())
- ((()))
- ((a b c))
- ((1 2) 3 4)
- (mouse (monitor 512 342) (keyboard US))
- (defun factorial (x) (if (eql x 0) 1 (* x (factorial (- x 1)))))
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.108773
			</create_date>
			<explanation type="str">
				*
@comport
funny%stuff
9^
case-2
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				What is an atom?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.287606
			</last_changed>
			<answer type="str">
				- A number or a symbol.
- Any sequence of letters, digits, and punctuation characters is an atom if it is preceded and followed by a blank space (this includes the beginning or end of a line) or a parenthesis.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.116772
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				What is a symbol?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.295456
			</last_changed>
			<answer type="str">
				- A symbol is essentially a unique named item (it is identical to any other symbol spelled the same way),
- written as an alphanumeric string in source code, 
- used either as a variable name or as a data item in symbolic processing
- it doesn't matter whether you use uppercase or lowercase letters in your symbol names
- a symbol can have a value as a function and a variable (and documentation, property list, and print name) at the same time
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.120406
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				What is a form?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.303924
			</last_changed>
			<answer type="str">
				A form can be either an atom or a list. The important thing is that the form is meant to be evaluated.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.124685
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				How does evaluation of a form work?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.311861
			</last_changed>
			<answer type="str">
				- If the form is an atom, Lisp treats the atom as a name, and retrieves the value for the name (if a value exists).
- If the form is a list, then the first element must be either a symbol or a special form called a lambda expression. It is applied to the remaining elements.
- There are two kinds of forms that don't evaluate all of their arguments: special forms and macros.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.128910
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				What do (atom 123) and (numberp 123) do?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.319712
			</last_changed>
			<answer type="str">
				- ATOM and NUMBERP are predicates.
- Predicates return a true or false value. 
- ATOM returns T if its one argument is a Lisp atom. 
- NUMBERP returns T if its argument is a number.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.133123
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				The right way to return multiple values from a function is ...
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.327600
			</last_changed>
			<answer type="str">
				... to use the VALUES form.

-? (values 1 2 3 :hi &quot;Hello&quot;)
-&gt; 1
-&gt; 2
-&gt; 3
-&gt; :HI
-&gt; &quot;Hello&quot;

VALUES is a function, and so evaluates its arguments.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.137495
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				SETQ
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.335431
			</last_changed>
			<answer type="str">
				- Sets the value of a variable, e.g. (setq my-name &quot;David&quot;)
- SETQ's first argument is a symbol. This is not evaluated. 
- The second argument is assigned as the variable's value. 
- SETQ returns the value of its last argument.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.141705
			</create_date>
			<explanation type="str">
				-? (setq var-1 'var-2)
-&gt; VAR-2

-? var-1
-&gt; VAR-2

-? var-2
-&gt;| Error: Unbound variable

-? (set var-1 99)
-&gt; 99
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				SET
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.343280
			</last_changed>
			<answer type="str">
				- Similar to SETQ but the first argument gets evaluated.
- Assigns a value to the symbol that is the value of the first argument.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.145914
			</create_date>
			<explanation type="str">
				? (let ((a 3)
        (b 4)
        (c 5))
    (* (+ a b) c))
=&gt; 35
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				LET
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.351108
			</last_changed>
			<answer type="str">
				- In general, LET looks like this: (let (bindings) forms)
- where bindings is any number of two-element lists -- each list containing a symbol and a value -- and forms is any number of Lisp forms.
- The forms are evaluated, in order, using the values established by the bindings.
- LET returns the value(s) returned by the last form.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 02:01:46.102947
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				IF
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.359084
			</last_changed>
			<answer type="str">
				Takes three arguments: a test expression, a then expression, and an else expression.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.150131
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				COND
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.366937
			</last_changed>
			<answer type="str">
				- The COND macro lets you evaluate Lisp forms conditionally.
- (cond ((conditition1) value1) ((condition2) value2))
- The clauses are selected in order -- as soon as one test succeeds, the corresponding body forms are evaluated and the value of the last body form becomes the value of the COND form.
- Conventional use of COND uses T as the test form in the final clause (&quot;else&quot;).
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.154366
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				EQL
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.374794
			</last_changed>
			<answer type="str">
				- EQL returns T if its two arguments are identical (or the same number), otherwise NIL.
- (eql a b)
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.158584
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				QUOTE
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.382657
			</last_changed>
			<answer type="str">
				- Suppresses Lisp's normal evaluation rules.
- Useful when we'd like a symbol to stand for itself, rather than its value.
- (SETQ A B) vs. (SETQ A (QUOTE B))
- Shorthand: 'form ≡ (QUOTE form)
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.163062
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				CONS
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.390513
			</last_changed>
			<answer type="str">
				- (cons item list) → adds a item to the beginning of list.
- The second argument must be a list or NIL (empty list is equivalent to NIL).
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.167256
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				NIL
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.398405
			</last_changed>
			<answer type="str">
				- NIL is one of two symbols in Lisp that isn't a keyword but still has itself as its constant value (T is the other symbol that works like this).
- The fact that NIL evaluates to itself, combined with () ≡ NIL, means that you can write () rather than (QUOTE ()).
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.171654
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				LIST
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.406310
			</last_changed>
			<answer type="str">
				- Constructs a list from its arguments.
- (list 1 2 3) → (1 2 3)
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.175855
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				FIRST
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.414199
			</last_changed>
			<answer type="str">
				- Returns the first value of a list.
- Also known as: CAR
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.180061
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				REST
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.422100
			</last_changed>
			<answer type="str">
				- Returns all values of a list except for the first one.
- Also known as: CDR
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.184277
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				Binding (let) vs. Assignment (setq)
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.430249
			</last_changed>
			<answer type="str">
				- Binding creates a new place to hold a value
- Assignment gives an old place a new value (changes the value of an existing binding).
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.188478
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				DEFUN
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.438717
			</last_changed>
			<answer type="str">
				- Defines a named function.
- Does not evaluate its arguments.
- Returns the name of the defined function.

Has three arguments:
# the name of the function
# a list of argument names
# the body of the function
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.193002
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				LAMBDA
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.446662
			</last_changed>
			<answer type="str">
				- Defines an anonymous (unnamed) function.
- Can't be evaluated.
- A lambda form must appear only where Lisp expects to find a function -- normally as the first element of a form.

Has two arguments:
# a list of argument names
# the body of the function
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.197236
			</create_date>
			<explanation type="str">
				Macros can be considered functions that accept and return abstract syntax trees (Lisp S-expressions). These functions are invoked before the evaluator or compiler to produce the final source code.

(defmacro until (test &amp;body body)
   `(do ()
        (,test)
      ,@body))
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				DEFMACRO
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.454586
			</last_changed>
			<answer type="str">
				- Defines a named macro.
- Has three arguments: a name, a list of argument names, and a body.
- Macros return a form, not values.
- When Lisp evaluates a call to your macro, it first evaluates the body of your macro definition, then evaluates the result of the first evaluation.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.201682
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				How does a backquote (`) change the evaluation of a form?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.462614
			</last_changed>
			<answer type="str">
				- Backquotes behave like quotes -- suppressing evaluation of all the enclosed forms -- except where a comma appears within the backquoted form. 
- A symbol following the comma is evaluated.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.206570
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				MACROEXPAND
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.470579
			</last_changed>
			<answer type="str">
				- A function that shows how a macro body appears before evaluation.
- Since MACROEXPAND is a function, it evaluates its arguments. This is why you have to quote the form you want expanded.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.210856
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				MULTIPLE-VALUE-BIND
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.478522
			</last_changed>
			<answer type="str">
				- Binds each value to a separate symbol.
- e.g. (multiple-value-bind (a b c) (values 2 3 5) (+ a b c))
- Excess values are ignored.
- Excess symbols are bound to NIL.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.215095
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				PROGN
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.486842
			</last_changed>
			<answer type="str">
				(PROGN form1 form2 ... formN) evaluates form1 through formN in order, and returns the value of formN.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.219331
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				READ, READ-CHAR
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.495276
			</last_changed>
			<answer type="str">
				- READ reads the input until enter is pressed.
- READ accepts Lisp data.
- READ takes an input stream as an optional argument.
- READ-CHAR reads one character.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.223685
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				WRITE, WRITE-CHAR
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.503286
			</last_changed>
			<answer type="str">
				- WRITE prints the value so that it could be presented to READ to create the same value.
- WRITE-CHAR prints just the readable character, without the extra Lisp syntax (the #\) that would identify it to READ as a character.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.228159
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				MAKE-ARRAY
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.511283
			</last_changed>
			<answer type="str">
				- Takes a list of dimensions and returns an array.
- By default, an array can contain any kind of data; optional arguments let you restrict the element data types for the sake of efficiency.
- An array's rank is the same as its number of dimensions.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.232415
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				AREF
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.519274
			</last_changed>
			<answer type="str">
				- Retrieves an element of an array.
- AREF's first argument is the array.
- The remaining arguments specify the index along each dimension.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:00
			</create_date>
			<explanation type="str">
				(setf (first mylist) 'n)
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				SETF
			</question>
			<last_changed type="datetime">
				2006-08-17 03:05:31.001187
			</last_changed>
			<answer type="str">
				- SETF is similar to SETQ, except where SETQ assigns a value to a symbol, SETF assigns a value to a place.
- You can give any (even) number of arguments to setf.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.241265
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				To set an element of an array ...
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.535308
			</last_changed>
			<answer type="str">
				... use AREF inside a SETF form.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.245540
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				Vectors
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.543335
			</last_changed>
			<answer type="str">
				- Vectors are one-dimensional arrays.
- You can create a vector using MAKE-ARRAY, and access its elements using AREF.
- - e.g. (make-array 3).
- You can create a vector from a list of values, using the VECTOR form.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.249794
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				ELT
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.551443
			</last_changed>
			<answer type="str">
				- (elt sequence index)
- Accesses the element of sequence specified by index.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.254048
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				STRING
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.559472
			</last_changed>
			<answer type="str">
				Changes characters or symbols to strings.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.258301
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				LENGTH
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.567499
			</last_changed>
			<answer type="str">
				Returns the length of a sequence.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.262813
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				MAKE-STRING
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.575559
			</last_changed>
			<answer type="str">
				- make-string size {&amp;key initial-element element-type} =&gt; string 
- make-string returns a simple string of length size whose elements have been initialized to initial-element.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.267056
			</create_date>
			<explanation type="str">
				Properties are less often used in modern Lisp programs. Hash tables (see below), structures (described in the next section), and CLOS objects (see Chapter 7 and Chapter 14) provide all of the capabilities of property lists in ways that are easier to use and more efficient.
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				A symbol's property list ...
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.583614
			</last_changed>
			<answer type="str">
				- ... is like a miniature database which associates a number of key/value pairs with the symbol.
- e.g. (setf (get 'object-1 'color) 'red)
- (get 'object-1 'color) → red
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.271567
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				TYPE-OF
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.591678
			</last_changed>
			<answer type="str">
				TYPE-OF returns a symbol or a list indicating the type of its argument.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.275835
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				What is a structure?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.599741
			</last_changed>
			<answer type="str">
				A Lisp structure gives you a way to create an object which stores related data in named slots.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.280103
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				DEFSTRUCT
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.607826
			</last_changed>
			<answer type="str">
				- e.g. (defstruct struct-1 color size shape position weight)
- Defines a structured type, named struct-1, with named slots as specified by the slot-options (color, size, ...).
- Lisp generates the make-_structname_ and _structname-slotname_ functions when you define a structure using DEFSTRUCT.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.284386
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				MAKE-_STRUCTNAME_
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.615919
			</last_changed>
			<answer type="str">
				Creates a new structure of type STRUCTNAME (which was defined before).
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.288666
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				_STRUCTNAME-SLOTNAME_
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.623984
			</last_changed>
			<answer type="str">
				- (_STRUCTNAME-SLOTNAME_ object1)
- Function that accesses slots of a struct instance assigned to the variable object1.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.292935
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				A hash table ...
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.632072
			</last_changed>
			<answer type="str">
				- ... associates a value with a unique key.
- Unlike a property list, a hash table is well suited to a large number of key/value pairs, but suffers from excessive overhead for smaller sets of associations.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.297209
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				MAKE-HASH-TABLE
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.640383
			</last_changed>
			<answer type="str">
				Creates and returns a new hash table.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.301471
			</create_date>
			<explanation type="str">
				- If you want to use numbers for keys, you must create a hash table using the form: (make-hash-table :test #'eql)
- If you want to use lists for keys, create your hash table with: (make-hash-table :test #'equal)
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				GETHASH
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.648543
			</last_changed>
			<answer type="str">
				- (gethash key hash-table)
- Accesses values of a hash table.
- Returns two values: The first is the value associated with the key. The second is T if the key was found, and NIL otherwise.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.305976
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				REMHASH
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.656764
			</last_changed>
			<answer type="str">
				- (REMHASH key hash-table)
- Removes a key from a hash table.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.310526
			</create_date>
			<explanation type="str">
				(setf (gethash 'baz ht1) 'baz-value)
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				If you want to change the value for a hash table key ...
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.664885
			</last_changed>
			<answer type="str">
				... use GETHASH with SETF, just as if you were adding a new key/value pair.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.314812
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				DEFPACKAGE
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.673027
			</last_changed>
			<answer type="str">
				- The DEFPACKAGE macro provides most package operations.
- e.g. (defpackage util1 (:export init func1 func2) (:use common-lisp))
- The :USE option specifies that names from another package may be used without qualification
- The :IMPORT-FROM options bring in specific names.
- The :EXPORT option specifies the names that are exposed to clients of the package.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.319105
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				IN-PACKAGE
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.681185
			</last_changed>
			<answer type="str">
				The IN-PACKAGE macro sets the current package.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.323361
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				USE-PACKAGE
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.689347
			</last_changed>
			<answer type="str">
				The USE-PACKAGE form causes the current (or a given) package to inherit all the external symbols of the named packages.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.327712
			</create_date>
			<explanation type="str">
				- PRIN1 behaves as PRINT, but does not surround its output with whitespace.
- PRINC behaves as PRIN1, but generates output intended for display, rather than READ; for example, PRINC omits the quotes around a string, and does not print escape characters.
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				PRINT
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.697526
			</last_changed>
			<answer type="str">
				- The PRINT function changes a Lisp object into the sequence of characters that READ would need to reconstruct it.
- Takes an output stream as an optional argument.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.332204
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				OPEN
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.705798
			</last_changed>
			<answer type="str">
				- Attaches a stream to a file.
- e.g. (setq out-stream (open &quot;my-temp-file&quot; :direction :output))
 - e.g. (setq in-stream (open &quot;my-temp-file&quot; :direction :input))
- To finish operations on the stream and close the associated file, use the CLOSE function.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.336694
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				6 Characters
			</hint>
			<question type="str">
				Which characters are reserved for the programmer?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.714138
			</last_changed>
			<answer type="str">
				[ ] { } ! ?
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.340973
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				READ-DELIMITED-LIST
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.722373
			</last_changed>
			<answer type="str">
				- Expects one argument: The terminating character.
- The other two arguments are optional -- the input stream and a flag which is normally set to T when used in reader macro functions.
- Reads objects from the input stream until it encounters the terminating character, then returns all of the objects in a list.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.345548
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				What does `',form do?
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.730597
			</last_changed>
			<answer type="str">
				Evaluates form and returns the result, quoted.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:10:00
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				SET-MACRO-CHARACTER
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.738816
			</last_changed>
			<answer type="str">
				- (set-macro-character char new-function)
- causes char to be a macro character associated with the reader macro function new-function.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:11:00
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				GET-MACRO-CHARACTER
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.747048
			</last_changed>
			<answer type="str">
				- (get-macro-character char)
- returns as its primary value, function, the reader macro function associated with char.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:43:16.358427
			</create_date>
			<explanation type="str">
				- (defun open-bracket-macro-character (stream char) `',(read-delimited-list #\] stream t))
- (set-macro-character #\[ #'open-bracket-macro-character)
- (set-macro-character #\] (get-macro-character #\)))
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				Reader macro function
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.755293
			</last_changed>
			<answer type="str">
				- You can use reader macros to alter the behavior of the Lisp reader.
- Every reader macro function gets called with two arguments: the input stream and the character that caused the macro to be invoked.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 01:56:28.639815
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				LISTP
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.763520
			</last_changed>
			<answer type="str">
				A function that returns true if its argument is a list.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 02:00:35.640696
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				NULL / NOT
			</question>
			<last_changed type="datetime">
				2006-08-17 02:02:11.771748
			</last_changed>
			<answer type="str">
				Returns true of the empty list / if the argument is false (NIL).
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 02:04:40.323243
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				AND
			</question>
			<last_changed type="datetime">
				2006-08-17 02:04:40.323243
			</last_changed>
			<answer type="str">
				If all arguments are true (that is, not nil), then AND returns the value of the last one.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 02:05:40.619214
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				OR
			</question>
			<last_changed type="datetime">
				2006-08-17 02:05:40.619214
			</last_changed>
			<answer type="str">
				Returns the first argument that is not NIL.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 02:26:00
			</create_date>
			<explanation type="str">
				(format t &quot;~A plus ~A equals ~A.~%&quot; 2 3 (+ 2 3))
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				FORMAT
			</question>
			<last_changed type="datetime">
				2006-08-17 02:27:15.942398
			</last_changed>
			<answer type="str">
				- The most general output function.
 - The first argument indicates where the output is to be printed, 
- the second is a string template, 
- the remaining arguments are usually objects whose printed representations are to be inserted into the template.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 02:56:00
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				DEFPARAMETER
			</question>
			<last_changed type="datetime">
				2006-08-17 02:57:07.671183
			</last_changed>
			<answer type="str">
				- Creates a global variable.
- It's conventional to give global variables names that begin and end with asterisks.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 02:57:58.646366
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				DEFCONSTANT
			</question>
			<last_changed type="datetime">
				2006-08-17 02:57:58.646366
			</last_changed>
			<answer type="str">
				- Creates a global constant.
- Raises an error if the name given already exists.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 02:58:54.192341
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				BOUNDP
			</question>
			<last_changed type="datetime">
				2006-08-17 02:58:54.192341
			</last_changed>
			<answer type="str">
				Returns true if a symbol is the name of a global variable or constant.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 03:07:26.795386
			</create_date>
			<explanation type="str">
				(remove 'a lst)
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				REMOVE
			</question>
			<last_changed type="datetime">
				2006-08-17 03:07:26.795386
			</last_changed>
			<answer type="str">
				Returns a new list that doesn't contain the value given as an argument to REMOVE.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 13:53:00
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				DO
			</question>
			<last_changed type="datetime">
				2006-08-17 13:54:33.826183
			</last_changed>
			<answer type="str">
				- The do macro is the fundamental iteration operator in Common Lisp.
- The first argument is a list of variable specifications, each of the form (variable initial update), e.g. (i 0 (+ i 1)).
- The second argument to do should be a list containing one or more expressions.  The first expression is used to test whether iteration should stop. The remaining expressions in this list will be evaluated in order when iteration stops, and the value of the last will be returned as the value of the do.
- The remaining arguments to do comprise the body of the loop.  They will be evaluated, in order, on each iteration.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 13:58:01.962034
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				DOLIST
			</question>
			<last_changed type="datetime">
				2006-08-17 13:58:01.962034
			</last_changed>
			<answer type="str">
				- DOLIST takes an argument of the form (obj lst), followed by a body of expressions.
- The body will be evaluated with variable bound to successive elements of the list returned by expression.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 14:00:00
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				FUNCTION
			</question>
			<last_changed type="datetime">
				2006-08-17 14:03:14.702236
			</last_changed>
			<answer type="str">
				- If we give the name of a function to _function_, it will return the associated object (a function).
- Like quote, function is a special operator, so we don't have to quote the argument.
- #' is an abbreviation for FUNCTION.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 14:04:48.693920
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				APPLY
			</question>
			<last_changed type="datetime">
				2006-08-17 14:04:48.693920
			</last_changed>
			<answer type="str">
				- takes a function and a list of arguments for it, 
- returns the result of applying the function to the arguments.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 14:06:00
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				FUNCALL
			</question>
			<last_changed type="datetime">
				2006-08-17 14:06:44.341117
			</last_changed>
			<answer type="str">
				- takes a function as its first argument,
- calls the function with the remaining arguments.
			</answer>
		</Flashcard>
		<Flashcard>
			<create_date type="datetime">
				2006-08-17 14:14:17.041778
			</create_date>
			<explanation type="str">
				
			</explanation>
			<hint type="str">
				
			</hint>
			<question type="str">
				TYPEP
			</question>
			<last_changed type="datetime">
				2006-08-17 14:14:17.041778
			</last_changed>
			<answer type="str">
				- The function typep takes an object and a type specifier, and returns true if the object is of that type.
- e.g. (typep 27 'integer)
			</answer>
		</Flashcard>
	</FlashcardCollection>
</CourseItem>

