~ chicken-core (master) 10295114bb8f95fd756d0be099446b99ce244bca
commit 10295114bb8f95fd756d0be099446b99ce244bca
Author: Kristian Lein-Mathisen <kristianlein@gmail.com>
AuthorDate: Fri Dec 5 10:30:56 2025 +0100
Commit: Mario Domenech Goulart <mario@parenteses.org>
CommitDate: Sun Dec 21 17:54:52 2025 +0100
manual formatting: delete trailing newlines
with the exception of empty newlines, as these are presumably prefixes
with a fixed number of whitespace to indicate a source-code block.
this patch also presumes that trailing newline has no affect (it does
in Markdown, for example)
Signed-off-by: Mario Domenech Goulart <mario@parenteses.org>
diff --git a/manual/Accessing external objects b/manual/Accessing external objects
index 7ab819e3..ebf24d38 100644
--- a/manual/Accessing external objects
+++ b/manual/Accessing external objects
@@ -23,12 +23,12 @@ void CopyResults(double* vector) {
memcpy(vector, bezierBuffer, totalOutputPoints * sizeof(double));
}
-// The original C function which takes an array of doubles,
+// The original C function which takes an array of doubles,
// does some sort of transmogrification,
// retains a new malloc'd array of the results
// and returns the count
int GenerateResults(double* vector, int count) {
- ...
+ ...
}
</enscript>
@@ -43,7 +43,7 @@ and the "egg" which calls the C functions can be implemented like this:
(define GenerateResults (foreign-lambda integer "GenerateResults" f64vector integer))
(define (input->output input)
- (let* ([size (GenerateResults input (f64vector-length input))]
+ (let* ([size (GenerateResults input (f64vector-length input))]
[vect (make-f64vector size)])
(printf "returned size ~a~%" size)
(CopyResults vect)
diff --git a/manual/Cross development b/manual/Cross development
index 9e91e122..096e3e3e 100644
--- a/manual/Cross development
+++ b/manual/Cross development
@@ -242,7 +242,7 @@ Yes, looks good.
By default, the tools that CHICKEN provides to install, list and uninstall
extensions will operate on both the host and the target repository.
-So running {{arm-chicken-install}} will compile and install the extension
+So running {{arm-chicken-install}} will compile and install the extension
for the host system and for the cross-target. To selectively install, uninstall
or list extensions for either the host or the target system use the
{{-host}} and {{-target}} options for the tools.
@@ -261,8 +261,8 @@ egg dependencies.
> $HOME/cross/bin/mingw-csc -static hello.scm
# hello.exe should now run on Window without any runtime DLL dependencies:
> x86_64-w64-mingw32-objdump -p hello.exe | grep "DLL Name"
- DLL Name: KERNEL32.dll
- DLL Name: msvcrt.dll
+ DLL Name: KERNEL32.dll
+ DLL Name: msvcrt.dll
DLL Name: USER32.dll
DLL Name: WS2_32.dll
# or using wine
diff --git a/manual/Data representation b/manual/Data representation
index 92091e70..21e4dc6a 100644
--- a/manual/Data representation
+++ b/manual/Data representation
@@ -4,7 +4,7 @@
== Data representation
There exist two different kinds of data objects in the CHICKEN system:
-immediate and non-immediate objects.
+immediate and non-immediate objects.
=== Immediate objects
@@ -78,7 +78,7 @@ container should be a weak reference ({{C_WEAK_PAIR_TYPE}}), otherwise
it should be a strong reference ({{C_PAIR_TYPE}}).
'''strings''': objects with type bits {{C_STRING_TYPE}}, currently 0010,
-holding a bytevector with the string contents represented as an UTF-8 encoded
+holding a bytevector with the string contents represented as an UTF-8 encoded
byte sequence. Note that invalid UTF-8 sequences are allowed inside strings,
extracted characters at positions that contain invalid UTF-8
sequences are represented as the trailing surrogate pair half (U+DC00|xx).
@@ -134,7 +134,7 @@ a pointer to the object referred to.
'''pointers''': special vector objects with type bits
{{C_POINTER_TYPE}}, currently 1001. The single slot contains a machine pointer.
-'''tagged pointers''': special vector objects with type bits
+'''tagged pointers''': special vector objects with type bits
{{C_TAGGED_POINTER_TYPE}}, currently 1011, Tagged pointers are similar to pointers,
but the object contains an additional
slot with a tag (an arbitrary data object) that identifies the type
diff --git a/manual/Declarations b/manual/Declarations
index 430a92af..de0d1826 100644
--- a/manual/Declarations
+++ b/manual/Declarations
@@ -362,7 +362,7 @@ Do not generate safety-checks. This is the same as specifying the
[declaration specifier] (unused IDENTIFIER ...)
-Disables any warnings when the global variable {{IDENTIFIER}} is not defined but used,
+Disables any warnings when the global variable {{IDENTIFIER}} is not defined but used,
or defined but never used and not exported.
diff --git a/manual/Deployment b/manual/Deployment
index 61c4ff8f..8e42b952 100644
--- a/manual/Deployment
+++ b/manual/Deployment
@@ -4,7 +4,7 @@
== Deployment
-CHICKEN generates fully native binaries that can be distributed like
+CHICKEN generates fully native binaries that can be distributed like
normal C/C++ programs. There are various methods of deployment,
depending on platform, linkage, external dependencies and whether
the application should be built from sources or precompiled and
@@ -60,13 +60,13 @@ An alternate way of distributing compiled code is to ship the runtime library
that you use. To make this work, any runtime linker paths compiled into
binary objects need to be deleted or changed by using a tool like {{chrpath(1)}}
or {{patchelf(1)}}, to a value that indicates that
-the library lookup should start in the same location as the main program.
+the library lookup should start in the same location as the main program.
(e.g. {{$ORIGIN}} on Linux). Don't forget to copy any extensions from the
extension repository ({{$PREFIX/lib/chicken/$BINARYVERSION}}).
Alternatively start your program through a separate
script that sets {{LD_LIBRARY_PATH}} (or {{DYLD_LIBRARY_PATH}} on
-MacOS X).
+MacOS X).
For more details, consult
the documentation of the operating system that you use to build your
deployed binaries.
@@ -74,7 +74,7 @@ deployed binaries.
A directory containing all binaries is fully "portable" in the sense that it will run directly
from an USB-stick or any other removable media. At runtime the program can find
out its location by invoking the {{repository-path}} procedure, which will return
-the full pathname in which the application is located.
+the full pathname in which the application is located.
Should the program depend on more libraries which are not available by
default on the intended target systems, and which you would like to
@@ -163,7 +163,7 @@ depends on.
==== MacOS X
-The {{otool(1)}} program will show you dynamic libraries that your
+The {{otool(1)}} program will show you dynamic libraries that your
application requires. {{DYLD_LIBRARY_PATH}}
can be set to override runtime linker paths and {{install_name_tool(1)}}
is available to patch runtime linker paths directly. All of these tools
diff --git a/manual/Embedding b/manual/Embedding
index 936b7903..ba5915b3 100644
--- a/manual/Embedding
+++ b/manual/Embedding
@@ -24,7 +24,7 @@ only if this function has been called by the containing application.
=== CHICKEN_initialize
- [C function] int CHICKEN_initialize (int heap, int stack, int symbols, void *toplevel)
+ [C function] int CHICKEN_initialize (int heap, int stack, int symbols, void *toplevel)
Initializes the Scheme execution context and memory. {{heap}} holds
the number of bytes that are to be allocated for the secondary
@@ -109,7 +109,7 @@ Applies the procedure passed in {{func}} to the list of arguments {{args}}, writ
[C macro] int CHICKEN_apply_to_string (C_word func, C_word args, char *result, int size)
-Applies the procedure passed in {{func}} to the list of arguments {{args}}, writing a textual
+Applies the procedure passed in {{func}} to the list of arguments {{args}}, writing a textual
representation of the result into {{result}}.
diff --git a/manual/Extension tools b/manual/Extension tools
index 4381677b..692bf2c2 100644
--- a/manual/Extension tools
+++ b/manual/Extension tools
@@ -8,7 +8,7 @@ are {{chicken-install}}, {{chicken-uninstall}} and {{chicken-status}}.
{{chicken-install}} can be used in two modes: first, as a simple package
manager that downloads publicly available eggs (and their dependencies, if
-necessary) and compiles the contained extensions, installing them on
+necessary) and compiles the contained extensions, installing them on
a user's system.
For development of eggs, {{chicken-install}} can also be invoked
@@ -42,7 +42,7 @@ Alternatively obtain write/execute access to the default location of the reposit
(usually {{/usr/local/lib/chicken}}) to avoid running as
root. {{chicken-install}} also provides a {{-sudo}} option to perform
the last installation steps as root user, but do building and other
-.setup script processing as normal. A third solution is to
+.setup script processing as normal. A third solution is to
override {{VARDIR}} when building the system
(for example by passing {{"VARDIR=/foo/bar"}} on the make command line,
or by modifying {{config.make}}. Eggs will then be installed in
@@ -61,7 +61,7 @@ repository directory, set the
environment variables to the full path of the new reopsitory and copy all files
from the default repository into the new one.
-Note that your binary version can differ from the one given in
+Note that your binary version can differ from the one given in
the examples here, if your
chicken version is older or newer than the one used in these examples.
Check your default location for the correct binary-version number.
@@ -84,7 +84,7 @@ sense when used in combination with {{CHICKEN_REPOSITORY_PATH}}.
{{CHICKEN_INSTALL_PREFIX}} is intended for special situations and should be used
with care. It is a last-resort utility to customize where build-results are placed.
-Make sure the paths given in these
+Make sure the paths given in these
environment variables are absolute and not relative.
=== Static linking
@@ -98,7 +98,7 @@ the dynamically loadable version. Use the {{linkage}} egg
description property to select in what modes a component should
be built.
-To identify the necessary object files during linking of
+To identify the necessary object files during linking of
extensions, {{csc}}
creates so-called "link files" and installs them along the
statically compiled object file in the local egg repository.
@@ -118,7 +118,7 @@ before trying to retrieve an egg via the network.
The file {{<PREFIX>/share/chicken/setup.defaults}} holds various
parameters that define where eggs should be downloaded, together
with more obscure options, and can be used to customize the
-sources where eggs will be retrieved from. Adding a line of
+sources where eggs will be retrieved from. Adding a line of
the form
{{(location "<PATH>")}}
@@ -162,11 +162,11 @@ You can override the location of the cache by setting the
==== Retrieval
First the egg names given on the command line (or, if no arguments
-are given, all eggs identified by {{.egg}} files in the current
+are given, all eggs identified by {{.egg}} files in the current
directory, including any in a subdirectory named {{chicken}})
must be retrieved, either from a local source or from the official
egg repository. Should the egg exist in the egg cache we check
-whether this cached version is out of date. A cached egg is
+whether this cached version is out of date. A cached egg is
considered out of date, if a) it is locally available and all cached
files belonging to the egg do not have newer timestamps than the
local files, or b) if it is a remotely retrieved egg and no
diff --git a/manual/Extensions b/manual/Extensions
index 7f3a4077..5541351d 100644
--- a/manual/Extensions
+++ b/manual/Extensions
@@ -22,7 +22,7 @@ are usually libraries.
Extensions are technically nothing but dynamically loadable compiled
files with added meta-data that describes dependencies to other
-eggs, version information and things like the author/maintainer
+eggs, version information and things like the author/maintainer
of the egg. Three tools provide an easy to use interface for
installing eggs, removing them and querying the current
status of installed eggs.
@@ -33,7 +33,7 @@ status of installed eggs.
To install an egg, run the {{chicken-install}} program
with the egg name as argument. The egg archive is
downloaded, its contents extracted and the contained egg description
-file is analyzed and the appropriate commands executed.
+file is analyzed and the appropriate commands executed.
This file is an abstract description of the contents of
the egg and
will be translated by {{chicken-install}} into build- and installation
@@ -100,7 +100,7 @@ examples of simple eggs.
==== A simple library
-The simplest case is a single file that does not export any syntax.
+The simplest case is a single file that does not export any syntax.
For example
<enscript highlight=scheme>
@@ -121,7 +121,7 @@ We need an {{.egg}} file to build and install our nifty extension:
(components (extension hello)))
</enscript>
-After entering
+After entering
$ chicken-install
@@ -181,7 +181,7 @@ administrative rights or use the {{-sudo}} option.
The extension can be used from the command line:
$ hello2 one two three
- Hello,
+ Hello,
one two three !
De-installation is just as easy - use the {{chicken-uninstall}}
diff --git a/manual/Included modules b/manual/Included modules
index db2cffa4..64f8e224 100644
--- a/manual/Included modules
+++ b/manual/Included modules
@@ -9,8 +9,8 @@ part of a standard installation. On top of these, you can install
additional modules through the [[Extensions|eggs]] system.
Note that toplevel code that is not contained in a module has by
-default all exports of the [[Module scheme|scheme]],
-[[Module (chicken base)|(chicken base)]] and
+default all exports of the [[Module scheme|scheme]],
+[[Module (chicken base)|(chicken base)]] and
[[Module (chicken syntax)|(chicken syntax)]] available.
* [[Module scheme]] : Compatibility module for CHICKEN 5 code
diff --git a/manual/Interface to external functions and variables b/manual/Interface to external functions and variables
index 4475704f..3e8fa79f 100644
--- a/manual/Interface to external functions and variables
+++ b/manual/Interface to external functions and variables
@@ -9,10 +9,10 @@ The macros in this section, such as {{define-foreign-type}} and {{define-externa
Note: Using the foreign library directly from the interpreter or the REPL will not work.
* [[Accessing external objects]]
-* [[Foreign type specifiers]]
-* [[Embedding]]
-* [[C interface]]
-* [[Data representation]]
+* [[Foreign type specifiers]]
+* [[Embedding]]
+* [[C interface]]
+* [[Data representation]]
---
Previous: [[Included modules]]
diff --git a/manual/Module (chicken bytevector) b/manual/Module (chicken bytevector)
index 2c0c4181..e314d090 100644
--- a/manual/Module (chicken bytevector)
+++ b/manual/Module (chicken bytevector)
@@ -65,7 +65,7 @@ Returns a bytevector with the contents of {{STRING}}.
<procedure>(latin1->string BYTEVECTOR)</procedure>
-Returns a string with the contents of {{BYTEVECTOR}} converted from Latin-1 (ISO-8859-1) encoding to UTF-8.
+Returns a string with the contents of {{BYTEVECTOR}} converted from Latin-1 (ISO-8859-1) encoding to UTF-8.
=== string->latin1
diff --git a/manual/Module (chicken io) b/manual/Module (chicken io)
index 80675b49..4cccd6e8 100644
--- a/manual/Module (chicken io)
+++ b/manual/Module (chicken io)
@@ -66,7 +66,7 @@ character(s).
<procedure>(read-string! NUM STRING [PORT [START]])</procedure><br>
Read or write {{NUM}} characters from/to {{PORT}}, which defaults to the
-value of {{(current-input-port)}} or {{(current-output-port)}}, respectively.
+value of {{(current-input-port)}} or {{(current-output-port)}}, respectively.
If {{NUM}} is {{#f}} or not given, then all data up to the end-of-file is
read, or, in the case of {{write-string}} the whole string is written. If no
diff --git a/manual/Module (chicken irregex) b/manual/Module (chicken irregex)
index f0c39dc7..27120c96 100644
--- a/manual/Module (chicken irregex)
+++ b/manual/Module (chicken irregex)
@@ -226,10 +226,10 @@ Examples:
(irregex-replace "(.)(.)" "ab" 2 1 "*") => "ba*"
-(irregex-replace "...bar" "xxfoobar" (lambda (m)
+(irregex-replace "...bar" "xxfoobar" (lambda (m)
(string-reverse (irregex-match-substring m)))) => "xxraboof"
-(irregex-replace "(...)(bar)" "xxfoobar" 2 (lambda (m)
+(irregex-replace "(...)(bar)" "xxfoobar" 2 (lambda (m)
(string-reverse (irregex-match-substring m 1)))) => "xxbaroof"
</enscript>
@@ -772,7 +772,7 @@ You define a chunking API with {{make-irregex-chunker}}:
<procedure>(make-irregex-chunker <get-next> <get-string> [<get-start> <get-end> <get-substring> <get-subchunk>])</procedure>
-where
+where
{{(<get-next> chunk) => }} returns the next chunk, or {{#f}} if there are no more chunks
diff --git a/manual/Module (chicken load) b/manual/Module (chicken load)
index 6f2e6c0e..3ead217e 100644
--- a/manual/Module (chicken load)
+++ b/manual/Module (chicken load)
@@ -120,7 +120,7 @@ taken from the following set:
; {{local}} : If {{local}} is given, then any C/C++ symbols defined in the dynamically loaded file are not available for subsequently loaded files and libraries. Use this if you have linked foreign code into your dynamically loadable file and if you don't want to export them (for example because you want to load another file that defines the same symbols).
; {{global}} : The default is {{global}}, which means all C/C++ symbols are available to code loaded at a later stage.
; {{now}} : If {{now}} is specified, all symbols are resolved immediately.
-; {{lazy}} : Unresolved symbols are resolved as code from the file is executed. This is the default.
+; {{lazy}} : Unresolved symbols are resolved as code from the file is executed. This is the default.
Note that this procedure does not control the way Scheme variables are handled -
this facility is mainly of interest when accessing foreign code.
diff --git a/manual/Module (chicken memory) b/manual/Module (chicken memory)
index f30402d4..56e1027f 100644
--- a/manual/Module (chicken memory)
+++ b/manual/Module (chicken memory)
@@ -9,7 +9,7 @@ procedures. '''Use at your own risk.'''
=== Foreign pointers
-The abstract class of ''pointer'' is divided into 2 categories:
+The abstract class of ''pointer'' is divided into 2 categories:
; ''pointer object'' : is a regular or [[#Tagged pointers|tagged]] foreign pointer object.
@@ -321,7 +321,7 @@ a pointer object allow {{#f}} as an alternative representation of
the {{NULL}}-pointer.
-==== make-pointer-vector
+==== make-pointer-vector
<procedure>(make-pointer-vector LENGTH [INIT])</procedure>
diff --git a/manual/Module (chicken number-vector) b/manual/Module (chicken number-vector)
index 2aeb7118..d02b64c3 100644
--- a/manual/Module (chicken number-vector)
+++ b/manual/Module (chicken number-vector)
@@ -4,7 +4,7 @@
== Module (chicken numvector)
Homogeneous numeric vector datatypes. This module provides a superset
-of [[http://srfi.schemers.org/srfi-4/srfi-4.html|SRFI-4]]. The
+of [[http://srfi.schemers.org/srfi-4/srfi-4.html|SRFI-4]]. The
module [[Module srfi-4|srfi-4]] is also available for compatibility reasons.
When loaded, the feature identifier {{srfi-4}} is defined.
@@ -53,7 +53,7 @@ called float vectors):
The only difference between the two float vector types is that
{{f64vector}}s preserve at least as much precision as {{f32vector}}s.
-And there are two datatypes of inexact complex homogeneous vectors (which will be called complex vectors):
+And there are two datatypes of inexact complex homogeneous vectors (which will be called complex vectors):
<table>
<tr><th>Datatype</th><th>Type of elements</th></tr>
@@ -82,12 +82,12 @@ analogous to those available for Scheme's heterogeneous vectors.
The external representation of instances of the datatype {{XXXvector}}
is {{#XXX( ...elements... )}}.
-For example,
+For example,
#u8(0 #e1e2 #xff)}} ; a {{u8vector}} of length 3 containing 0, 100, 255
#f64(-1.5) ; a {{f64vector}} of length 1 containing -1.5.
-This external representation is also available in program source code. For example,
+This external representation is also available in program source code. For example,
(set! x '#u8(1 2 3))
@@ -106,8 +106,8 @@ is equivalent to
'#u8(#\x7f #\x45 #\x4c #\x46 2 1)
Character literals inside numeric vectors expand into the UTF-8 sequence of
-the characters they represent, for strings the contained characters
-are interpreted in whatever encoding is used for the text file or stream
+the characters they represent, for strings the contained characters
+are interpreted in whatever encoding is used for the text file or stream
in which the literal appears.
Note that {{#u8"..."}} can be used as an abbreviation for the special case
diff --git a/manual/Module (chicken pathname) b/manual/Module (chicken pathname)
index a1bd95ec..235fa23a 100644
--- a/manual/Module (chicken pathname)
+++ b/manual/Module (chicken pathname)
@@ -31,7 +31,7 @@ For any component that is not contained in {{PATHNAME}}, {{#f}} is returned.
Returns a string that names the file with the
components {{DIRECTORY, FILENAME}} and (optionally)
{{EXTENSION}} with {{SEPARATOR}} being the directory separation indicator
-({{/}}).
+({{/}}).
{{DIRECTORY}} can be {{#f}} (meaning no
directory component), a string or a list of strings. {{FILENAME}}
and {{EXTENSION}} should be strings or {{#f}}.
@@ -75,11 +75,11 @@ stripped.
Performs a simple "normalization" on the {{PATHNAME}}, suitably for
{{PLATFORM}}, which should be one of the symbols {{windows}}
or {{unix}} and defaults to on whatever platform is currently
-in use. All relative path elements and duplicate separators are processed
+in use. All relative path elements and duplicate separators are processed
and removed. If {{NAME}} ends with
a {{/}} or is empty, a slash is appended to the tail.
-No directories or files are actually tested for existence; this
+No directories or files are actually tested for existence; this
procedure only canonicalises path syntax.
=== directory-null?
diff --git a/manual/Module (chicken random) b/manual/Module (chicken random)
index a5994782..7e1d7ee2 100644
--- a/manual/Module (chicken random)
+++ b/manual/Module (chicken random)
@@ -29,7 +29,7 @@ random manner as possible.
<procedure>(pseudo-random-integer RANGE)</procedure>
-Returns a uniformly distributed pseudo random integer between 0 and
+Returns a uniformly distributed pseudo random integer between 0 and
{{RANGE-1}}, which may be a big integer.
diff --git a/manual/Module (chicken syntax) b/manual/Module (chicken syntax)
index 36f306a8..6bfdf6a8 100644
--- a/manual/Module (chicken syntax)
+++ b/manual/Module (chicken syntax)
@@ -179,7 +179,7 @@ expressions as arguments.
Returns an explicit-renaming macro transformer procedure created from
the procedural macro body {{TRANSFORMER}}, which is a procedure of
-three arguments.
+three arguments.
This procedure will be called on expansion with the complete
s-expression of the macro invocation, a rename procedure that
diff --git a/manual/Module (chicken tcp) b/manual/Module (chicken tcp)
index 26661a8e..0715607f 100644
--- a/manual/Module (chicken tcp)
+++ b/manual/Module (chicken tcp)
@@ -4,7 +4,7 @@
== Module (chicken tcp)
This module provides basic facilities for communicating over TCP
-sockets.
+sockets.
All errors related to failing network operations will raise a condition
of kind {{(exn i/o net)}}.
@@ -43,7 +43,7 @@ Waits until a connection is established on the port on which
output-port that can be used to communicate with the remote
process. The current value of {{tcp-accept-timeout}} is used to
determine the maximal number of milliseconds (if any) to wait
-until a connection is established. When a client connects any
+until a connection is established. When a client connects any
read- and write-operations on the returned ports will use the
current values (at the time of the connection) of {{tcp-read-timeout}}
and {{tcp-write-timeout}}, respectively, to determine the maximal
diff --git a/manual/Module (scheme base) b/manual/Module (scheme base)
index 59d883d1..7dae7d87 100644
--- a/manual/Module (scheme base)
+++ b/manual/Module (scheme base)
@@ -192,8 +192,8 @@ When a procedure is applied to a list of arguments, the parameters and arguments
* Required-parameters are bound to successive arguments starting with the first argument. It shall be an error if there are fewer arguments than required-parameters.
* Next, the optional-parameters are bound with the remaining arguments. If there are fewer arguments than optional-parameters, then the remaining optional-parameters are bound to the result of the evaluation of their corresponding <initializer>, if one was specified, otherwise {{#f}}. The corresponding <initializer> is evaluated in an environment in which all previous parameters have been bound.
-* If there is a rest-parameter, then it is bound to a list containing all the remaining arguments left over after the argument bindings with required-parameters and optional-parameters have been made.
-* If {{#!key}} was specified in the parameter-list, there should be an even number of remaining arguments. These are interpreted as a series of pairs, where the first member of each pair is a keyword specifying the parameter name, and the second member is the corresponding value. If the same keyword occurs more than once in the list of arguments, then the corresponding value of the first keyword is the binding value. If there is no argument for a particular keyword-parameter, then the variable is bound to the result of evaluating <initializer>, if one was specified, otherwise {{#f}}. The corresponding <initializer> is evaluated in an environment in which all previous parameters have been bound.
+* If there is a rest-parameter, then it is bound to a list containing all the remaining arguments left over after the argument bindings with required-parameters and optional-parameters have been made.
+* If {{#!key}} was specified in the parameter-list, there should be an even number of remaining arguments. These are interpreted as a series of pairs, where the first member of each pair is a keyword specifying the parameter name, and the second member is the corresponding value. If the same keyword occurs more than once in the list of arguments, then the corresponding value of the first keyword is the binding value. If there is no argument for a particular keyword-parameter, then the variable is bound to the result of evaluating <initializer>, if one was specified, otherwise {{#f}}. The corresponding <initializer> is evaluated in an environment in which all previous parameters have been bound.
Needing a special mention is the close relationship between the
rest-parameter and possible keyword-parameters. Declaring a
@@ -222,7 +222,7 @@ Example:
((lambda x x) 3 4 5 6) => (3 4 5 6)
((lambda (x y #!rest z) z)
3 4 5 6) => (5 6)
- ((lambda (x y #!optional z #!rest r #!key i (j 1))
+ ((lambda (x y #!optional z #!rest r #!key i (j 1))
(list x y z i: i j: j))
3 4 5 i: 6 i: 7) => (3 4 5 i: 6 j: 1)
@@ -419,7 +419,7 @@ expressions then #f is returned.
(or (= 2 2) (> 2 1)) ===> #t
(or (= 2 2) (< 2 1)) ===> #t
(or #f #f #f) ===> #f
- (or (memq 'b '(a b c))
+ (or (memq 'b '(a b c))
(/ 3 0)) ===> (b c)
<macro>(unless TEST EXP1 EXP2 ...)</macro>
@@ -607,7 +607,7 @@ are lambda expressions and the restriction is satisfied automatically.
<macro>(letrec* <bindings> <body>) </macro>
-Syntax: <Bindings> has the form {{((<variable[1]> <init[1]>) ...)}}, and
+Syntax: <Bindings> has the form {{((<variable[1]> <init[1]>) ...)}}, and
<body> is a sequence of zero or more
definitions followed by one or more expressions as described in section 4.1.4.
It is an error for a <variable> to appear more than once in the list of
@@ -651,7 +651,7 @@ Evaluating {{(means '(3 (1 4)))}} returns three values: 8/3, 2.28942848510666
<macro>(let-values <mv binding spec> <body>)</macro>
-Syntax: <Mv binding spec> has the form {{((<formals[1]> <init[1]>) ...)}},
+Syntax: <Mv binding spec> has the form {{((<formals[1]> <init[1]>) ...)}},
where each <init> is an expression, and <body> is
zero or more definitions followed by a sequence of one or more expressions as
described in section 4.1.4. It is an error for a variable to appear more than
@@ -795,7 +795,7 @@ given time is called the dynamic environment.
Returns a newly allocated parameter object, which is a procedure that accepts
zero arguments and returns the value associated with the parameter object.
-Initially, this value is the value of {{(converter init)}}, or of {{init}}
+Initially, this value is the value of {{(converter init)}}, or of {{init}}
if the conversion procedure {{converter}} is not specified. The associated value can be temporarily changed
using {{parameterize}}, which is described below.
@@ -820,7 +820,7 @@ of the parameters are restored without passing them to the conversion
procedure. The results of the last expression in the <body> are returned as the
results of the entire parameterize expression.
-Note: If the conversion procedure is not idempotent, the results of
+Note: If the conversion procedure is not idempotent, the results of
(parameterize ((x (x))) ...), which appears to bind the parameter
x to its current value, might not be what the user expects.
@@ -901,13 +901,13 @@ the comma at-sign expression sequence. A comma at-sign should only
appear within a list or vector <qq template>.
`(list ,(+ 1 2) 4) ===> (list 3 4)
- (let ((name 'a)) `(list ,name ',name))
+ (let ((name 'a)) `(list ,name ',name))
===> (list a (quote a))
- `(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b)
+ `(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b)
===> (a 3 4 5 6 b)
- `(( foo ,(- 10 3)) ,@(cdr '(c)) . ,(car '(cons)))
+ `(( foo ,(- 10 3)) ,@(cdr '(c)) . ,(car '(cons)))
===> ((foo 7) . cons)
- `#(10 5 ,(sqrt 4) ,@(map sqrt '(16 9)) 8)
+ `#(10 5 ,(sqrt 4) ,@(map sqrt '(16 9)) 8)
===> #(10 5 2 4 3 8)
Quasiquote forms may be nested. Substitutions are made only for
@@ -916,11 +916,11 @@ outermost backquote. The nesting level increases by one inside each
successive quasiquotation, and decreases by one inside each
unquotation.
- `(a `(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f)
+ `(a `(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f)
===> (a `(b ,(+ 1 2) ,(foo 4 d) e) f)
(let ((name1 'x)
(name2 'y))
- `(a `(b ,,name1 ,',name2 d) e))
+ `(a `(b ,,name1 ,',name2 d) e))
===> (a `(b ,x ,'y d) e)
The two notations `<qq template> and (quasiquote <qq template>) are
@@ -930,9 +930,9 @@ identical in all respects. ,<expression> is identical to (unquote
lists whose car is one of these symbols may vary between
implementations.
- (quasiquote (list (unquote (+ 1 2)) 4))
+ (quasiquote (list (unquote (+ 1 2)) 4))
===> (list 3 4)
- '(quasiquote (list (unquote (+ 1 2)) 4))
+ '(quasiquote (list (unquote (+ 1 2)) 4))
===> `(list ,(+ 1 2) 4)
i.e., (quasiquote (list (unquote (+ 1 2)) 4))
@@ -1188,7 +1188,7 @@ This allows syntactic abstractions to expand into code containing ellipses.
(be-like-begin sequence)
-(sequence 1 2 3 4) ==> 4
+(sequence 1 2 3 4) ==> 4
}}
As an example, if {{let}} and {{cond}} have their standard meaning
@@ -1219,7 +1219,7 @@ which would result in an invalid procedure call.
<macro>(syntax-error <message> <args> ...)</macro>
{{syntax-error}} behaves similarly to {{error}} except that implementations with
-an expansion pass separate from evaluation should signal an error as soon as
+an expansion pass separate from evaluation should signal an error as soon as
{{syntax-error}} is expanded. This can be used as a syntax-rules <template> for a
<pattern> that is an invalid use of the macro, which can provide more
descriptive error messages. <message> is a string literal, and <args> arbitrary
@@ -1496,7 +1496,7 @@ in allowing the ellipsis identifier to be user-defined by passing it as the firs
argument to the {{syntax-rules}} form. Also, "tail" patterns of the form
(syntax-rules ()
- ((_ (a b ... c)
+ ((_ (a b ... c)
...
are supported.
@@ -1539,7 +1539,7 @@ constructor, and field accessors and mutators are defined for each record type.
<macro>(define-record-type <name> <constructor> <pred> <field> ...)</macro>
Syntax: <name> and <pred> are identifiers. The <constructor> is of the form
-{{(<constructor name> <field name> ...)}} and each <field> is either of the form
+{{(<constructor name> <field name> ...)}} and each <field> is either of the form
{{(<field name> <accessor name>)}} or of the form {{(<field name> <accessor name> <modifier name>)}}. It is an error for the same identifier to occur more than once
as a field name. It is also an error for the same identifier to occur more than
once as an accessor or mutator name.
@@ -1659,15 +1659,15 @@ the contents of the file are spliced directly into the current library
definition. This can be used, for example, to share the same export declaration
among multiple libraries as a simple form of library interface.
-The {{cond-expand}} declaration has the same syntax and semantics as the
+The {{cond-expand}} declaration has the same syntax and semantics as the
{{cond-expand}} expression type, except that it expands to spliced-in library
declarations rather than expressions enclosed in begin.
One possible implementation of libraries is as follows: After all {{cond-expand}}
library declarations are expanded, a new environment is constructed for the
-library consisting of all imported bindings. The expressions from all begin,
+library consisting of all imported bindings. The expressions from all begin,
{{include}} and {{include-ci}} library declarations are expanded in that environment in
-the order in which they occur in the library. Alternatively, {{cond-expand}} and
+the order in which they occur in the library. Alternatively, {{cond-expand}} and
{{import}} declarations may be processed in left to right order interspersed with
the processing of other declarations, with the environment growing as imported
bindings are added to it by each import declaration.
@@ -2146,7 +2146,7 @@ given in the procedure's signature. The conventions are as follows:
; {{z, z1, ... zj, ...}} : complex number
; {{x, x1, ... xj, ...}} : real number
; {{y, y1, ... yj, ...}} : real number
-; {{q, q1, ... qj, ...}} : rational number
+; {{q, q1, ... qj, ...}} : rational number
; {{n, n1, ... nj, ...}} : integer
; {{k, k1, ... kj, ...}} : exact non-negative integer
@@ -2535,7 +2535,7 @@ reported.
Radix must be an exact integer. The R7RS standard only requires
implementations to support 2, 8, 10, or 16, but CHICKEN allows any
-radix between 2 and 36, inclusive (note: a bug in CHICKEN 5 currently
+radix between 2 and 36, inclusive (note: a bug in CHICKEN 5 currently
limits the upper bound to 16). If omitted, radix defaults to
10. The procedure number->string takes a number and a radix and
returns as a string an external representation of the given number in
@@ -2881,7 +2881,7 @@ Returns the kth element of list. (This is the same as the car of
(list-ref '(a b c d) 2) ===> c
(list-ref '(a b c d)
- (inexact->exact (round 1.8)))
+ (inexact->exact (round 1.8)))
===> c
<procedure>(list-set! list k obj)</procedure>
@@ -2892,10 +2892,10 @@ The {{list-set!}} procedure stores obj in element k of list.
(let ((ls (list 'one 'two 'five!)))
(list-set! ls 2 'three)
- ls)
+ ls)
==> (one two three)
- (list-set! '(0 1 2) 1 "oops")
+ (list-set! '(0 1 2) 1 "oops")
==> error ; constant list
<procedure>(memq obj list)</procedure><br>
@@ -2935,11 +2935,11 @@ fields of the pairs in alist, while {{assv}} uses {{eqv?}} and {{assoc}} uses
(assq 'd e) ===> #f
(assq (list 'a) '(((a)) ((b)) ((c))))
===> #f
- (assoc (list 'a) '(((a)) ((b)) ((c))))
+ (assoc (list 'a) '(((a)) ((b)) ((c))))
===> ((a))
- (assq 5 '((2 3) (5 7) (11 13)))
+ (assq 5 '((2 3) (5 7) (11 13)))
===> unspecified
- (assv 5 '((2 3) (5 7) (11 13)))
+ (assv 5 '((2 3) (5 7) (11 13)))
===> (5 7)
Rationale: Although they are ordinarily used as predicates, memq,
@@ -3024,11 +3024,11 @@ this procedure.
The following examples assume that the implementation's standard case
is lower case:
- (symbol->string 'flying-fish)
+ (symbol->string 'flying-fish)
===> "flying-fish"
(symbol->string 'Martin) ===> "martin"
(symbol->string
- (string->symbol "Malvina"))
+ (string->symbol "Malvina"))
===> "Malvina"
<procedure>(string->symbol string)</procedure><br>
@@ -3042,19 +3042,19 @@ themselves. See symbol->string.
The following examples assume that the implementation's standard case
is lower case:
- (eq? 'mISSISSIppi 'mississippi)
+ (eq? 'mISSISSIppi 'mississippi)
===> #t
- (string->symbol "mISSISSIppi")
+ (string->symbol "mISSISSIppi")
===> the symbol with name "mISSISSIppi"
- (eq? 'bitBlt (string->symbol "bitBlt"))
+ (eq? 'bitBlt (string->symbol "bitBlt"))
===> #f
(eq? 'JollyWog
(string->symbol
- (symbol->string 'JollyWog)))
+ (symbol->string 'JollyWog)))
===> #t
(string=? "K. Harper, M.D."
(symbol->string
- (string->symbol "K. Harper, M.D.")))
+ (string->symbol "K. Harper, M.D.")))
===> #t
==== Characters
@@ -3221,9 +3221,9 @@ Examples:
"The word \"recursion\" has many meanings."
"Another example:\ntwo lines of text"
- "Here's text \
+ "Here's text \
containing just one line"
- "\x03B1; is named GREEK SMALL LETTER ALPHA."
+ "\x03B1; is named GREEK SMALL LETTER ALPHA."
The length of a string is the
number of characters that it contains. This number is an exact, non-negative
@@ -3271,7 +3271,7 @@ of string and returns an unspecified value.
<procedure>(string=? string[1] string[2] string[3] ...)</procedure><br>
Returns #t if the two strings are the same length and contain the same
-characters in the same positions, otherwise returns #f.
+characters in the same positions, otherwise returns #f.
<procedure>(string<? string[1] string[2] string[3] ...)</procedure><br>
<procedure>(string>? string[1] string[2] string[3] ...)</procedure><br>
@@ -3389,13 +3389,13 @@ k must be a valid index of vector. Vector-ref returns the contents of
element k of vector.
(vector-ref '#(1 1 2 3 5 8 13 21)
- 5)
+ 5)
===> 8
(vector-ref '#(1 1 2 3 5 8 13 21)
(let ((i (round (* 2 (acos -1)))))
(if (inexact? i)
(inexact->exact i)
- i)))
+ i)))
===> 13
<procedure>(vector-set! vector k obj)</procedure><br>
@@ -3405,10 +3405,10 @@ of vector. The value returned by vector-set! is unspecified.
(let ((vec (vector 0 '(2 2 2 2) "Anna")))
(vector-set! vec 1 '("Sue" "Sue"))
- vec)
+ vec)
===> #(0 ("Sue" "Sue") "Anna")
-
- (vector-set! '#(0 1 2) 1 "doe")
+
+ (vector-set! '#(0 1 2) 1 "doe")
===> error ; constant vector
<procedure>(vector->list vector [start [end]])</procedure><br>
@@ -3418,9 +3418,9 @@ Vector->list returns a newly allocated list of the objects contained in
the elements of vector. List->vector returns a newly created vector
initialized to the elements of the list list.
- (vector->list '#(dah dah didah))
+ (vector->list '#(dah dah didah))
===> (dah dah didah)
- (list->vector '(dididit dah))
+ (list->vector '(dididit dah))
===> #(dididit dah)
<procedure>(vector-fill! vector fill)</procedure><br>
@@ -3510,9 +3510,9 @@ Returns #t if obj is a procedure, otherwise returns #f.
(procedure? car) ===> #t
(procedure? 'car) ===> #f
- (procedure? (lambda (x) (* x x)))
+ (procedure? (lambda (x) (* x x)))
===> #t
- (procedure? '(lambda (x) (* x x)))
+ (procedure? '(lambda (x) (* x x)))
===> #f
(call-with-current-continuation procedure?)
===> #t
@@ -3544,11 +3544,11 @@ Like in SRFI-1, this procedure allows the arguments to be of unequal
length; it terminates when the shortest list runs out. This is a
CHICKEN extension to R7RS.
- (map cadr '((a b) (d e) (g h)))
+ (map cadr '((a b) (d e) (g h)))
===> (b e h)
(map (lambda (n) (expt n n))
- '(1 2 3 4 5))
+ '(1 2 3 4 5))
===> (1 4 27 256 3125)
(map + '(1 2 3) '(4 5 6)) ===> (5 7 9)
@@ -3559,7 +3559,7 @@ CHICKEN extension to R7RS.
count)
'(a b))) ===> (1 2) or (2 1)
-<procedure>(string-map proc string[1] string[2] ...)</procedure>
+<procedure>(string-map proc string[1] string[2] ...)</procedure>
It is an error if proc does not accept as many arguments as there are strings and return a single character.
@@ -3597,14 +3597,14 @@ proc is applied to the elements of the
vectors is unspecified. If multiple returns occur from vector-map, the values
returned by earlier returns are not mutated.
- (vector-map cadr '#((a b) (d e) (g h)))
+ (vector-map cadr '#((a b) (d e) (g h)))
==> #(b e h)
(vector-map (lambda (n) (expt n n))
- '#(1 2 3 4 5))
+ '#(1 2 3 4 5))
==> #(1 4 27 256 3125)
- (vector-map + '#(1 2 3) '#(4 5 6 7))
+ (vector-map + '#(1 2 3) '#(4 5 6 7))
==> #(5 7 9)
(let ((count 0))
@@ -3635,9 +3635,9 @@ CHICKEN extension to R7RS.
<procedure>(string-for-each proc string[1] string[2] ...)</procedure>
It is an error if proc does not accept as many arguments as there are strings.
-The arguments to string-for-each are like the arguments to string-map, but
+The arguments to string-for-each are like the arguments to string-map, but
string-for-each calls
-proc for its side effects rather than for its values. Unlike string-map,
+proc for its side effects rather than for its values. Unlike string-map,
string-for-each is guaranteed to call
proc on the elements of the
strings in order from the first element(s) to the last, and the value returned
@@ -3655,9 +3655,9 @@ proc to mutate any of the strings.
<procedure>(vector-for-each proc vector[1] vector[2] ...)</procedure>
It is an error if proc does not accept as many arguments as there are vectors.
-The arguments to vector-for-each are like the arguments to vector-map, but
+The arguments to vector-for-each are like the arguments to vector-map, but
vector-for-each calls
-proc for its side effects rather than for its values. Unlike vector-map,
+proc for its side effects rather than for its values. Unlike vector-map,
vector-for-each is guaranteed to call
proc on the elements of the
vectors in order from the first element(s) to the last, and the value returned
@@ -3771,7 +3771,7 @@ continuations take exactly one value. Values might be defined as
follows:
(define (values . things)
- (call-with-current-continuation
+ (call-with-current-continuation
(lambda (cont) (apply cont things))))
<procedure>(call-with-values producer consumer)</procedure><br>
@@ -3857,7 +3857,7 @@ dynamic context of the {{dynamic-wind}} form.
=== Exceptions
This section describes Scheme’s exception-handling and exception-raising
-procedures.
+procedures.
Exception handlers are one-argument procedures that determine the action the
program takes when an exceptional situation is signaled. The system implicitly
@@ -3896,7 +3896,7 @@ thunk.
(lambda ()
(+ 1 (raise 'an-error))))
-prints "something went wrong"
+prints "something went wrong"
After printing, the second example then raises another exception.
<procedure>(raise obj)</procedure>
@@ -3912,7 +3912,7 @@ obj and the object raised by the secondary exception is unspecified.
<procedure>(raise-continuable obj)</procedure>
Raises an exception by invoking the current exception handler on
-obj. The handler is called with the same dynamic environment as the call to
+obj. The handler is called with the same dynamic environment as the call to
raise-continuable, except that: (1) the current exception handler is the one
that was in place when the handler being called was installed, and (2) if the
handler being called returns, then it will again become the current exception
@@ -4107,7 +4107,7 @@ port, rendering the
port incapable of delivering or accepting data. It is an error to apply the
last two procedures to a port which is not an input or output port,
respectively. Scheme implementations may provide ports which are simultaneously
-input and output ports, such as sockets; the close-input-port and
+input and output ports, such as sockets; the close-input-port and
close-output-port procedures can then be used to close the input and output
sides of the port independently.
@@ -4120,7 +4120,7 @@ the string. If the string is modified, the effect is unspecified.
<procedure>(open-output-string)</procedure>
-Returns a textual output port that will accumulate characters for retrieval by
+Returns a textual output port that will accumulate characters for retrieval by
get-output-string.
<procedure>(get-output-string port)</procedure>
@@ -4148,7 +4148,7 @@ bytevector.
<procedure>(open-output-bytevector)</procedure>
-Returns a binary output port that will accumulate bytes for retrieval by
+Returns a binary output port that will accumulate bytes for retrieval by
get-output-bytevector.
<procedure>(get-output-bytevector port)</procedure>
@@ -4160,7 +4160,7 @@ so far in the order they were output.
==== Input
-If port is omitted from any input procedure, it defaults to the value returned by
+If port is omitted from any input procedure, it defaults to the value returned by
(current-input-port). It is an error to attempt an input operation on a closed
port.
@@ -4299,7 +4299,7 @@ port and returns an unspecified value.
<procedure>(write-bytevector bytevector [port [start [end]]])</procedure>
See [[Module (chicken bytevector)|The (chicken bytevector) module]] for more
-information.
+information.
<procedure>(flush-output-port [port])</procedure>
@@ -4320,7 +4320,7 @@ return:
(features) ==>
(r7rs ratios exact-complex full-unicode
- gnu-linux little-endian
+ gnu-linux little-endian
fantastic-scheme
fantastic-scheme-1.0
space-ship-control-system)
diff --git a/manual/Module (scheme char) b/manual/Module (scheme char)
index 49a0f8c1..301d97ab 100644
--- a/manual/Module (scheme char)
+++ b/manual/Module (scheme char)
@@ -12,7 +12,7 @@ R7RS Operations on characters.
<procedure>(char-ci<=? char[1] char[2] char[3] ...)</procedure><br>
These procedures are similar to char=? et cetera, but they treat upper case
-and lower case letters as the same. For example, {{(char-ci=? #\A #\a)}} returns
+and lower case letters as the same. For example, {{(char-ci=? #\A #\a)}} returns
#t.
Specifically, these procedures behave as if char-foldcase were applied to their
@@ -85,7 +85,7 @@ to the argument in the sense of string=?, the argument may be returned. Note
that language-sensitive mappings and foldings are not used. The Unicode
Standard prescribes special treatment of the Greek letter Σ, whose normal
lower-case form is σ but which becomes ς at the end of a word. See UAX #44
-(part of the Unicode Standard) for details. However, implementations of
+(part of the Unicode Standard) for details. However, implementations of
string-downcase are not required to provide this behavior, and may choose to
change Σ to σ in all cases.
diff --git a/manual/Module (scheme complex) b/manual/Module (scheme complex)
index 8bf504c0..14fc9a29 100644
--- a/manual/Module (scheme complex)
+++ b/manual/Module (scheme complex)
@@ -27,7 +27,7 @@ Then all of
(magnitude z) ==> |x[3]|
(angle z) ==> x[angle]
-are true, where
+are true, where
−π ≤ x[angle] ≤ π with x[angle] = x[4] + 2 * π * n for some integer n.
diff --git a/manual/Module (scheme eval) b/manual/Module (scheme eval)
index fd975eae..2c1dcb4c 100644
--- a/manual/Module (scheme eval)
+++ b/manual/Module (scheme eval)
@@ -28,7 +28,7 @@ defaults to the value of {{(interaction-environment)}}. This is a
CHICKEN extension to R7RS, which, though strictly nonportable, is very
common among Scheme implementations.
- (eval '(* 7 3) (environment '(scheme base)))
+ (eval '(* 7 3) (environment '(scheme base)))
==> 21
(let ((f (eval '(lambda (f x) (f x x))
diff --git a/manual/Module (scheme file) b/manual/Module (scheme file)
index 800e6936..579a308b 100644
--- a/manual/Module (scheme file)
+++ b/manual/Module (scheme file)
@@ -15,8 +15,8 @@ proc are then passed to a procedure equivalent to call-with-port.
<procedure>(with-input-from-file string thunk)</procedure><br>
<procedure>(with-output-to-file string thunk)</procedure><br>
-The file is opened for input or output as if by open-input-file or
-open-output-file, and the new port is made to be the value returned by
+The file is opened for input or output as if by open-input-file or
+open-output-file, and the new port is made to be the value returned by
current-input-port or current-output-port (as used by {{(read)}}, {{(write obj)}}, and so forth). The
thunk is then called with no arguments. When the
thunk returns, the port is closed and the previous default is restored. It is
diff --git a/manual/Module (scheme lazy) b/manual/Module (scheme lazy)
index f4f60890..2c365111 100644
--- a/manual/Module (scheme lazy)
+++ b/manual/Module (scheme lazy)
@@ -10,7 +10,7 @@ Delayed evaluation
Semantics: The delay construct is used together with the procedure force to
implement lazy evaluation or call by need. {{(delay <expression>)}} returns an
-object called a promise which at some point in the future can be asked (by the
+object called a promise which at some point in the future can be asked (by the
force procedure) to evaluate <expression>, and deliver the resulting value. The
effect of <expression> returning multiple values is unspecified.
@@ -18,7 +18,7 @@ effect of <expression> returning multiple values is unspecified.
Semantics: The expression {{(delay-force expression)}} is conceptually similar to
{{(delay (force expression))}}, with the difference that forcing the result of delay-force will
-in effect result in a tail call to {{(force expression)}}, while forcing the result of
+in effect result in a tail call to {{(force expression)}}, while forcing the result of
{{(delay (force expression))}} might not. Thus iterative lazy algorithms that might result in a
long series of chains of delay and force can be rewritten using delay-force to
prevent consuming unbounded space during evaluation.
@@ -47,8 +47,8 @@ promise is not a promise, it may be returned unchanged.
(lambda (stream) (car (force stream))))
(define tail
(lambda (stream) (cdr (force stream))))
-
- (head (tail (tail integers))) ==> 2
+
+ (head (tail (tail integers))) ==> 2
The following example is a mechanical
transformation of a lazy stream-filtering algorithm into Scheme. Each call to a
@@ -60,15 +60,15 @@ effect force such sequences iteratively.
(define (stream-filter p? s)
(delay-force
- (if (null? (force s))
+ (if (null? (force s))
(delay '())
(let ((h (car (force s)))
(t (cdr (force s))))
(if (p? h)
(delay (cons h (stream-filter p? t)))
(stream-filter p? t))))))
-
- (head (tail (tail (stream-filter odd? integers)))) ==> 5
+
+ (head (tail (tail (stream-filter odd? integers)))) ==> 5
The following examples are not intended to
illustrate good programming style, as delay, force, and delay-force are mainly
@@ -87,9 +87,9 @@ matter how many times it is forced.
(force p) ==> 6
p ==> a promise, still
(begin (set! x 10)
- (force p)) ==> 6
+ (force p)) ==> 6
-Various extensions to this semantics of delay,
+Various extensions to this semantics of delay,
force and delay-force are supported in some implementations:
* Calling force on an object that is not a promise may simply return the object.
diff --git a/manual/Module (scheme load) b/manual/Module (scheme load)
index 17f7e375..aa5c3b20 100644
--- a/manual/Module (scheme load)
+++ b/manual/Module (scheme load)
@@ -13,7 +13,7 @@ them sequentially in the environment specified by
environment-specifier. If
environment-specifier is omitted, (interaction-environment) is assumed.
-The load procedure does not affect the values returned by current-input-port and
+The load procedure does not affect the values returned by current-input-port and
current-output-port. It returns an unspecified value.
CHICKEN offers a few extensions to the R7RS definition of {{load}}:
diff --git a/manual/Module (scheme process-context) b/manual/Module (scheme process-context)
index 17782ef6..5f05d76f 100644
--- a/manual/Module (scheme process-context)
+++ b/manual/Module (scheme process-context)
@@ -9,7 +9,7 @@ Returns the command line passed to the process as a list of strings. The first
string corresponds to the command name. It is
an error to mutate any of these strings.
-<procedure>(exit [obj])</procedure>
+<procedure>(exit [obj])</procedure>
Runs all outstanding dynamic-wind after procedures, terminates the running program, and communicates an exit
value to the operating system. If no argument is supplied, or if
@@ -38,7 +38,7 @@ Windows and Posix.
Many operating systems provide each running process with an environment
consisting of environment variables. (This environment is not to be confused
with the Scheme environments that can be passed to eval)
-Both the name and value of an environment variable are strings. The procedure
+Both the name and value of an environment variable are strings. The procedure
get-environment-variable returns the value of the environment variable
name, or #f if the named environment variable is not found. It may use locale
information to encode the name and decode the value of the environment
@@ -46,7 +46,7 @@ variable. It is an error if
get-environment-variable can’t decode the value. It is also an error to mutate
the resulting string.
- (get-environment-variable "PATH")
+ (get-environment-variable "PATH")
==> "/usr/local/bin:/usr/bin:/bin"
<procedure>(get-environment-variables)</procedure>
diff --git a/manual/Module (scheme read) b/manual/Module (scheme read)
index ce85dac5..2b737b7f 100644
--- a/manual/Module (scheme read)
+++ b/manual/Module (scheme read)
@@ -5,12 +5,12 @@
<procedure>(read [port])</procedure>
-If port is omitted from {{read}}, it defaults to the value returned by
+If port is omitted from {{read}}, it defaults to the value returned by
(current-input-port). It is an error to attempt an input operation on a closed
port.
The read procedure converts external representations of Scheme objects into the
-objects themselves. That is, it is a parser for the non-terminal <datum>.
+objects themselves. That is, it is a parser for the non-terminal <datum>.
It returns the next object parsable from the given
textual input port, updating
port to point to the first character past the end of the external
diff --git a/manual/Module (scheme time) b/manual/Module (scheme time)
index f6c17dc7..5ced50a6 100644
--- a/manual/Module (scheme time)
+++ b/manual/Module (scheme time)
@@ -16,7 +16,7 @@ plus a suitable constant might be the best an implementation can do.
Returns the number of jiffies as an exact integer that have elapsed since an
arbitrary, implementation-defined epoch. A jiffy is an implementation-defined
-fraction of a second which is defined by the return value of the
+fraction of a second which is defined by the return value of the
jiffies-per-second procedure. The starting epoch is guaranteed to be constant
during a run of the program, but may vary between runs.
diff --git a/manual/Module (scheme write) b/manual/Module (scheme write)
index 6bea3570..b7b62849 100644
--- a/manual/Module (scheme write)
+++ b/manual/Module (scheme write)
@@ -29,18 +29,18 @@ The write-shared procedure is the same as write, except that shared structure
must be represented using datum labels for all pairs and vectors that appear
more than once in the output.
-<procedure>(write-simple obj [port])</procedure>
+<procedure>(write-simple obj [port])</procedure>
The write-simple procedure is the same as write, except that shared structure
is never represented using datum labels. This can cause write-simple not to
terminate if
obj contains circular structure.
-<procedure>(display obj [port])</procedure>
+<procedure>(display obj [port])</procedure>
Writes a representation of
obj to the given textual output
-port. Strings that appear in the written representation are output as if by
+port. Strings that appear in the written representation are output as if by
write-string instead of by write. Symbols are not escaped. Character objects
appear in the representation as if written by write-char instead of by write.
diff --git a/manual/Modules b/manual/Modules
index 3f327aa5..aa6986d2 100644
--- a/manual/Modules
+++ b/manual/Modules
@@ -19,7 +19,7 @@ toplevel expressions. Exported syntax-definitions are compiled as
well, and can be accessed in interpreted or compiled code by loading
and importing the compiled file that contains the module.
-Imported toplevel bindings are mutable and can be assigned
+Imported toplevel bindings are mutable and can be assigned
(with {{set!}}), any modifications
to these will change the global value and will be visible to other
modules that export or import the same toplevel binding.
@@ -28,7 +28,7 @@ A module is initially empty (has no visible bindings with the exception
of {{import}} and {{cond-expand}}). You must at least
import the {{scheme}} module to do anything useful. To access any
of the non-standard macros and procedures, import the {{(chicken base)}}
-module.
+module.
CHICKEN's module system has the following features:
@@ -39,7 +39,7 @@ CHICKEN's module system has the following features:
At toplevel and outside of a module, the initially available bindings
are everything that is exported from the [[Module scheme|scheme]],
-[[Module (chicken base)|(chicken base)]] and
+[[Module (chicken base)|(chicken base)]] and
[[Module (chicken syntax)|(chicken syntax)]] modules.
@@ -71,7 +71,7 @@ remaining identifiers in the list to be visible as value bindings in the expansi
the macro (this is a hint to the module expander to export bindings
referenced by syntax-definitions which make use of them, but which
would normally be internal to the module - which gives more
-opportunities for optimization).
+opportunities for optimization).
{{(interface: INTERFACENAME)}} adds all exports defined for the given
interface to be added to the list of exported identifiers of this
@@ -115,7 +115,7 @@ at toplevel.
<macro>(export EXPORT ...)</macro>
Allows augmenting module-exports from inside the module-body.
-{{EXPORT}} is if the same form as an export-specifier in a
+{{EXPORT}} is if the same form as an export-specifier in a
{{module}} export list. An export must precede its first occurrence
(either use or definition).
@@ -187,7 +187,7 @@ containing the module.
<macro>(import-for-syntax IMPORT ...)</macro>
Similar to {{import}}, but imports exported bindings of a module into
-the environment in which macro transformers are evaluated.
+the environment in which macro transformers are evaluated.
Note: currently this isn't fully correct - value bindings are still
imported into the normal environment because a separate import
@@ -213,8 +213,8 @@ other modules:
<enscript hightlight=scheme>
(module r4rs ()
(import scheme (chicken module))
- (reexport
- (except scheme
+ (reexport
+ (except scheme
dynamic-wind values call-with-values eval scheme-report-environment
null-environment interaction-environment)))
</enscript>
@@ -235,7 +235,7 @@ inside modules are not visible outside of the module body.
=== import libraries
-''import libraries'' allow the syntactical (compile-time)
+''import libraries'' allow the syntactical (compile-time)
and run-time parts of a compiled module to be separated into a normal
compiled file and a shared library that only contains macro definitions
and module information. This reduces the size of executables and
@@ -252,7 +252,7 @@ can simply load the import library to make the module-definition
available. Syntax-support definitions defined with {{define-for-syntax}}
and expansion-time expressions of the form {{(begin-for-syntax ...)}}
will be added to import libraries to make them available for exported
-syntax. Note that these definitions will ruthlessly pollute the
+syntax. Note that these definitions will ruthlessly pollute the
toplevel namespace and so they should be used sparingly.
@@ -281,7 +281,7 @@ are defined and used:
(define-syntax greet
(syntax-rules ()
- ((_ whom)
+ ((_ whom)
(begin
(display "Hello, ")
(display whom)
@@ -342,7 +342,7 @@ load it manually:
#;1> ,l test.import.so
; loading test.import.so ...
#;1> (import test)
- #;2>
+ #;2>
Note that you must use import libraries if you compile code
that depends on other modules. The compiler will not execute
@@ -381,7 +381,7 @@ You can compile mymod.scm into a shared object and compile trymod.scm into an ex
csc trymod.scm
You can execute trymod and it will load the shared object mymod.so. When loading a shared
-object, the CHICKEN runtime uses the libld API to obtain the entry point ("C_toplevel") to invoke top-level initialization code of the module (which also setups up global bindings, etc.). However, if you move the trymod executable to another directory, it won't be able to find mymod.so to load it. If you want include the object into the executable directly, it needs to have a unique entry point name, separate from any other entry point of other linked modules.
+object, the CHICKEN runtime uses the libld API to obtain the entry point ("C_toplevel") to invoke top-level initialization code of the module (which also setups up global bindings, etc.). However, if you move the trymod executable to another directory, it won't be able to find mymod.so to load it. If you want include the object into the executable directly, it needs to have a unique entry point name, separate from any other entry point of other linked modules.
To give the module a name, we pass the "-unit modulename" argument to csc, and the name of the module is added to the entry point, so the entry point for mymod would become "C_mymod_toplevel". Then the "-uses modulename" argument is passed to csc while compiling and linking trymod so it knows to use that entry point.
@@ -392,12 +392,12 @@ To compile mymod.scm and trymod.scm and link them into the executable trymod, is
This creates an executable that is dynamically linked against libchicken.so, but which includes the mymod.o object file directly.
-To create an executable that is statically linked, issue the following commands:
+To create an executable that is statically linked, issue the following commands:
csc -c -static -J mymod.scm -unit mymod -o mymod.o
csc -o trymod -static mymod.o -uses mymod trymod.scm
-If you later add another module you'd need to compile it similar to how mymod.scm is
+If you later add another module you'd need to compile it similar to how mymod.scm is
compiled and add a "modulename.o -uses modulename" to the csc command that compiles trymod.scm.
It is possible to use the csm program installed by the [[/egg/csm|csm egg]] to do this automatically. To produce a dynamically linked program you would do:
@@ -447,7 +447,7 @@ We can easily instantiate the functor for other inputs:
(if (= i n)
'()
(cons (f i) (loop (+ i 1))))))
- (define (multiply x y)
+ (define (multiply x y)
(list-tabulate x (lambda _ (list-tabulate y (lambda _ '*))))))
(module star-squarer = (squaring-functor stars))
diff --git a/manual/Units and linking model b/manual/Units and linking model
index 5e809b10..1726e39e 100644
--- a/manual/Units and linking model
+++ b/manual/Units and linking model
@@ -5,11 +5,11 @@
Compiling Scheme code to standalone executables or dynamically
loadable files is the most common and simplest way of using CHICKEN.
-The extension system handles straightforward cases of static linking
+The extension system handles straightforward cases of static linking
of modules in a mostly transparent way, which is usually sufficient
for normal situations.
-But for more advanced uses like static linking, creating dynamic
+But for more advanced uses like static linking, creating dynamic
libraries or embedding compiled code into other (usually C/C++ based)
applications it is helpful to understand the internal model CHICKEN
uses to organize compiled code and separate compilation units.
@@ -34,7 +34,7 @@ startup process to execute the forms of the file.
For standalone executables and dynamically loaded code the toplevel
function has a fixed, predefined name ({{C_toplevel}}). For static
linking or for using multiple toplevels in a shared library that combines
-multiple compilation units (like {{libchicken}}, for example), non-internal
+multiple compilation units (like {{libchicken}}, for example), non-internal
function names have to be different to be properly
distinguished, so we assign a unique ''unit'' name to each compilation unit that
is intended to be linked with other compilation units.
@@ -63,10 +63,10 @@ argument.
Note that this model of using code from other compilation units does not
address syntax definitions, it's for running pure, fully expanded and compiled
-code. Syntax and modules are handled at a higher level, using import
+code. Syntax and modules are handled at a higher level, using import
libraries, which are compiled or interpreted separate files setting up module
-information to allow the compiler to properly resolve module namespaces
-and imports.
+information to allow the compiler to properly resolve module namespaces
+and imports.
----
Previous: [[Egg specification format]]
diff --git a/manual/Using the compiler b/manual/Using the compiler
index 0b2ec9d2..dd8f34b3 100644
--- a/manual/Using the compiler
+++ b/manual/Using the compiler
@@ -161,7 +161,7 @@ the source text should be read from standard input.
; -prelude EXPRESSIONS : Add {{EXPRESSIONS}} before all other toplevel expressions in the compiled file. This option may be given multiple times. Processing of this option takes place before processing of {{-prologue}}.
-; -profile :
+; -profile :
; -accumulate-profile : Instruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit {{exit}} or implicitly), profiling statistics are written to a file named {{PROFILE.<randomnumber>}}. Each line of the generated file contains a list with the procedure name, the number of calls and the time spent executing it. Use the {{chicken-profile}} program to display the profiling information in a more user-friendly form. Enter {{chicken-profile -help}} at the command line to get a list of available options. The {{-accumulate-profile}} option is similar to {{-profile}}, but the resulting profile information will be appended to any existing {{PROFILE}} file. {{chicken-profile}} will merge and sum up the accumulated timing information, if several entries for the same procedure calls exist. Only profiling information for global procedures will be collected. See the {{-:p}} option under [[#Runtime options|"Runtime options"]] below for statistical profiling support.
; -profile-name FILENAME : Specifies name of the generated profile information (which defaults to {{PROFILE.<randomnumber>}}. Implies {{-profile}}.
@@ -207,11 +207,11 @@ with default command-line options for the compiler.
==== Further options
-Enter
+Enter
csc -help
-to see a list of all supported options and short aliases to basic options.
+to see a list of all supported options and short aliases to basic options.
=== Runtime options
@@ -260,7 +260,7 @@ runtime options.
; {{-:hfNUMBER}} : If the free heap space is less than this number (8M by default), then the heap is grown. This is approximately the amount of generated heap garbage in bytes after which a major garbage collection will happen.
-; {{-:hsPERCENTAGE}} : Sets the shrink rate of the heap in percent. The heap is shrunk to {{PERCENTAGE}} when the watermark is reached. The default is 50. Note: If you want to make sure that the heap never shrinks, specify a value of {{0}}. (this can be useful in situations where an optimal heap-size is known in advance).
+; {{-:hsPERCENTAGE}} : Sets the shrink rate of the heap in percent. The heap is shrunk to {{PERCENTAGE}} when the watermark is reached. The default is 50. Note: If you want to make sure that the heap never shrinks, specify a value of {{0}}. (this can be useful in situations where an optimal heap-size is known in advance).
; {{-:huPERCENTAGE}} : Sets the memory usage watermark below which heap shrinking is triggered. The default is 25.
@@ -316,7 +316,7 @@ Holds a procedure of one argument. This procedure is applied to each toplevel ex
<parameter>user-pass</parameter>
-Holds a procedure of one argument. This procedure is applied to each toplevel expression '''after''' macro-expansion. The result of the procedure is then compiled in place of the original expression.
+Holds a procedure of one argument. This procedure is applied to each toplevel expression '''after''' macro-expansion. The result of the procedure is then compiled in place of the original expression.
<parameter>user-post-analysis-pass</parameter>
diff --git a/manual/Using the interpreter b/manual/Using the interpreter
index 14cda247..1a5c7e3e 100644
--- a/manual/Using the interpreter
+++ b/manual/Using the interpreter
@@ -138,7 +138,7 @@ error. Depending on whether compiled or interpreted code was executing
and how much debugging information is available, the call trace shows
trace-buffer entries of the following shape:
- <frame-number>:<environment?> <mode> <procedure-name> <form>
+ <frame-number>:<environment?> <mode> <procedure-name> <form>
{{<frame-number>}} gives the number of the call-trace entry, counting
from zero and beginning with the most recent entry. If a {{[]}}
@@ -164,7 +164,7 @@ variable lookup done internally by the interpreter.
The {{,e}} command runs the editor given by:
-* The parameter {{editor-command}} in the {{(chicken csi)}} module should
+* The parameter {{editor-command}} in the {{(chicken csi)}} module should
return a string naming
an external editor and defaults to {{#f}}, which means no editor is currently
selected (so the following alternatives are tried).
Trap