r7rs-small-texinfo

Unnamed repository; edit this file 'description' to name the repository.
git clone https://kaka.farm/~git/r7rs-small-texinfo
Log | Files | Refs | README

commit 9c2f80b00337ba9b2005c79c02785559c81c8b2c
parent a4c0e92c4e453159b0a249172a37d96b72ae30df
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date:   Wed,  7 Feb 2024 00:06:02 -0500

Example: Reflow.

Diffstat:
Mdoc/r7rs-small/scheme-example.texinfo | 31+++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/doc/r7rs-small/scheme-example.texinfo b/doc/r7rs-small/scheme-example.texinfo @@ -9,13 +9,12 @@ y_k^\prime = f_k(y_1, y_2, \ldots, y_n), \; k = 1, \ldots, n of differential equations with the method of Runge-Kutta. -The parameter @code{system-derivative} is a function that takes a system -state (a vector of values for the state variables -@math{y_1, \ldots, y_n}) -and produces a system derivative (the values -@math{y_1^\prime, \ldots, y_n^\prime}). The parameter @code{initial-state} provides an initial -system state, and @code{h} is an initial guess for the length of the -integration step. +The parameter @code{system-derivative} is a function that takes a +system state (a vector of values for the state variables +@math{y_1, \ldots, y_n})and produces a system derivative (the values +@math{y_1^\prime, \ldots, y_n^\prime}). The parameter +@code{initial-state} provides an initial system state, and @code{h} +is an initial guess for the length of the integration step. The value returned by @code{integrate-system} is an infinite stream of system states. @@ -32,9 +31,9 @@ system states. states))) @end lisp -The procedure @code{runge-kutta-4} takes a function, @code{f}, that produces a system -derivative from a system state. It produces a function that takes a system state and -produces a new system state. +The procedure @code{runge-kutta-4} takes a function, @code{f}, that +produces a system derivative from a system state. It produces a +function that takes a system state and produces a new system state. @lisp (define (runge-kutta-4 f h) @@ -79,9 +78,9 @@ produces a new system state. (elementwise (lambda (x) (* x s)))) @end lisp -The @code{map-streams} procedure is analogous to @code{map}: it -applies its first argument (a procedure) to all the elements of its second argument (a -stream). +The @code{map-streams} procedure is analogous to @code{map}: it applies +its first argument (a procedure) to all the elements of its second +argument (a stream). @lisp (define (map-streams f s) @@ -89,9 +88,9 @@ stream). (delay (map-streams f (tail s))))) @end lisp -Infinite streams are implemented as pairs whose car -holds the first element of the stream and whose cdr holds a promise to deliver the rest of -the stream. +Infinite streams are implemented as pairs whose car holds the first +element of the stream and whose cdr holds a promise to deliver the rest +of the stream. @lisp (define head car)