There are also compound data types in Scheme. The types commonly used in
LilyPond programming include pairs, lists, alists, and hash tables.
-@unnumberedsubsubsec Pairs
+@subheading Pairs
The foundational compound data type of Scheme is the @code{pair}. As
might be expected from its name, a pair is two values glued together.
Abelson, see
@uref{http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-14.html#footnote_Temp_133}
-
-@unnumberedsubsubsec Lists
+@subheading Lists
A very common Scheme data structure is the @emph{list}. Formally, a
list is defined as either the empty list (represented as @code{'()},
a dialect of lisp, where @q{lisp} is an abbreviation for
@q{List Processing}. Scheme expressions are all lists.
-@unnumberedsubsubsec Association lists (alists)
+@subheading Association lists (alists)
A special type of list is an @emph{association list} or @emph{alist}.
An alist is used to store data for easy retrieval.
Alists are widely used in LilyPond to store properties and other data.
-@unnumberedsubsubsec Hash tables
+@subheading Hash tables
A data structure that is used occasionally in LilyPond. A hash table
is similar to an array, but the indexes to the array can be any type
value resulting from their execution. They can also manipulate
variables defined outside of the procedure.
-@unnumberedsubsubsec Defining procedures
+@subheading Defining procedures
Procedures are defined in Scheme with define
15/2
@end lisp
-@unnumberedsubsubsec Predicates
+@subheading Predicates
Scheme procedures that return boolean values are often called
@emph{predicates}. By convention (but not necessity), predicate names
#f
@end lisp
-@unnumberedsubsubsec Return values
+@subheading Return values
Sometimes the user would like to have multiple Scheme expressions in
a procedure. There are two ways that multiple expressions can be
@node Scheme conditionals
@subsection Scheme conditionals
-@unnumberedsubsubsec if
+@subheading if
Scheme has an @code{if} procedure:
"a is not greater than b"
@end lisp
-@unnumberedsubsubsec cond
+@subheading cond
Another conditional procedure in scheme is @code{cond}:
@node LilyPond compound variables
@subsection LilyPond compound variables
-@unnumberedsubsubsec Offsets
+@subheading Offsets
Two-dimensional offsets (X and Y coordinates) as well as object sizes
(intervals with a left and right point) are entered as @code{pairs}. A
TextScript object. These numbers are measured in staff-spaces, so
this command moves the object 1 staff space to the right, and 2 spaces up.
-@unnumberedsubsubsec Extents
+@subheading Extents
todo -- write something about extents
-@unnumberedsubsubsec Property alists
+@subheading Property alists
todo -- write something about property alists
-@unnumberedsubsubsec Alist chains
+@subheading Alist chains
todo -- write something about alist chains
* Adding articulation to notes (example)::
@end menu
-
@node Displaying music expressions
@subsection Displaying music expressions