]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of git.sv.gnu.org:/srv/git/lilypond
authorCarl Sorensen <c_sorensen@byu.edu>
Thu, 25 Feb 2010 16:03:03 +0000 (09:03 -0700)
committerCarl Sorensen <c_sorensen@byu.edu>
Thu, 25 Feb 2010 16:03:03 +0000 (09:03 -0700)
1  2 
Documentation/extending/scheme-tutorial.itely

index 64bb01a28cd8a3b2cd1277ffa360a18375fcae05,f9c9538881eb87be368f41431079e9ce8610707d..e1a93f79ac41acc5d16672d2d018bd91c01d66a9
@@@ -73,7 -73,7 +73,7 @@@ see @rlearning{Other sources of informa
  users may simply choose @q{Run} from the Start menu and enter
  @q{guile}.
  
- Once the guile sandbox is running, you will received a guile prompt:
+ Once the guile sandbox is running, you will receive a guile prompt:
  
  @lisp
  guile>
@@@ -103,7 -103,7 +103,7 @@@ guile> 
  guile>
  @end lisp
  
- Scheme variables can be printed on the display by use of the display function:
+ Scheme variables can be printed on the display by using the display function:
  
  @lisp
  guile> (display a)
  @end lisp
  
  @noindent
- Note that the value @code{2} and the guile prompt @code{guile} both
- showed up on the same line.  This can be avoided by calling the newline
- procedure or displaying a newline character.
+ Note that both the value @code{2} and the guile prompt @code{guile}
+ showed up on the same line.  This can be avoided by calling the
newline procedure or displaying a newline character.
  
  @lisp
  guile> (display a)(newline)
@@@ -152,7 -152,7 +152,7 @@@ Numbers are entered in the standard fas
  floating point number (a non-integer number).
  
  @item Strings
- Strings are enclosed in double quotes,
+ Strings are enclosed in double quotes:
  
  @example
  "this is a string"
@@@ -198,7 -198,7 +198,7 @@@ For a complete listing see the Guile re
  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.
@@@ -253,7 -253,8 +253,7 @@@ Note:  @code{cdr} is pronounced "could-
  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{'()},
@@@ -283,7 -284,7 +283,7 @@@ Lists are a central part of Scheme.  In
  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.
@@@ -307,7 -308,7 +307,7 @@@ guile
  
  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
@@@ -406,13 -407,14 +406,14 @@@ guile> (/ 7.0 3.0
  2.33333333333333
  @end lisp
  
- When the scheme interpreter encounters an expression that is a list, the
- first element of the list is treated as a procedure to be evaluated
- with the arguments of the remainder of the list.  Therefore, all operators
- in Scheme are prefix operators.
+ When the scheme interpreter encounters an expression that is a list,
+ the first element of the list is treated as a procedure to be
+ evaluated with the arguments of the remainder of the list.  Therefore,
all operators in Scheme are prefix operators.
  
- If the first element of a Scheme expression that is a list passed to the
- interpreter`is @emph{not} an operator or procedure, an error will occur:
+ If the first element of a Scheme expression that is a list passed to
+ the interpreter is @emph{not} an operator or procedure, an error will
+ occur:
  
  @lisp
  guile> (1 2 3)
@@@ -427,10 -429,11 +428,11 @@@ ABORT: (misc-error
  guile>
  @end lisp
  
- Here you can see that the interpreter was trying to treat 1 as an operator
- or procedure, and it couldn't.  Hence the error is "Wrong type to apply: 1".
+ Here you can see that the interpreter was trying to treat 1 as an
+ operator or procedure, and it couldn't.  Hence the error is "Wrong
+ type to apply: 1".
  
- To create a list, then , we need to use the list operator, or we need to
+ Therefore, to create a list we need to use the list operator, or to
  quote the list so that the interpreter will not try to evaluate it.
  
  @lisp
@@@ -471,11 -474,11 +473,11 @@@ The quote mark @code{'} prevents the Sc
  @node Scheme procedures
  @subsection Scheme procedures
  
- Scheme procedures are executable scheme expressions that return
a value resulting from their execution.,  They can also manipulate
+ Scheme procedures are executable scheme expressions that return a
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
  
@@@ -501,7 -504,7 +503,7 @@@ guile> (average 3 12
  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
@@@ -515,7 -518,7 +517,7 @@@ guile> (less-than-ten? 15
  #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
@@@ -543,7 -546,7 +545,7 @@@ guile> (let ((x 2) (y 3) (z 4)) (displa
  @node Scheme conditionals
  @subsection Scheme conditionals
  
 -@unnumberedsubsubsec if
 +@subheading if
  
  Scheme has an @code{if} procedure:
  
@@@ -563,7 -566,7 +565,7 @@@ guile> (if (> a b) "a is greater than b
  "a is not greater than b"
  @end lisp
  
 -@unnumberedsubsubsec cond
 +@subheading cond
  
  Another conditional procedure in scheme is @code{cond}:
  
@@@ -654,8 -657,7 +656,7 @@@ in a music file, so we add @code{#}s ev
  
  TODO -- make this read right
  
- A similar thing
- happens with variables.  After defining a variable
+ A similar thing happens with variables.  After defining a variable
  
  @example
  twelve = 12
@@@ -802,7 -804,7 +803,7 @@@ while @code{twentyFour} is an variable
  @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
@@@ -818,15 -820,15 +819,15 @@@ This assigns the pair (1, 2) to the @co
  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
  
@@@ -889,6 -891,7 +890,6 @@@ to create complicated music functions
  * Adding articulation to notes (example)::
  @end menu
  
 -
  @node Displaying music expressions
  @subsection Displaying music expressions
  
@@@ -939,8 -942,7 +940,7 @@@ a file
  lilypond file.ly >display.txt
  @end example
  
- With a bit of reformatting, the above information is
- easier to read,
+ With a bit of reformatting, the above information is easier to read,
  
  @example
  (make-music 'SequentialMusic