commit 7e01a1d80d8eb6bea24cda2181511695387d12fd
parent 04b00aa1df2f5340f011883e4501256127476b8b
Author: Andres Navarro <canavarro82@gmail.com>
Date: Wed, 21 Dec 2011 05:48:36 -0300
Added missing char-title-case? to the ground environment. Updated the char section of the info/html manual.
Diffstat:
9 files changed, 273 insertions(+), 128 deletions(-)
diff --git a/TODO b/TODO
@@ -2,7 +2,6 @@
** Documentation:
*** update the manual with the current features
**** complete sections
-- Characters (add char-digit?, char->digit, and digit->char)
- Ports
**** Add missing sections
- vector
diff --git a/doc/html/Alphabetical-Index.html b/doc/html/Alphabetical-Index.html
@@ -83,13 +83,13 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-assoc-95"><code>assoc</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-assq-102"><code>assq</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Numbers.html#index-atan-229"><code>atan</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Ports.html#index-binary_002dport_003f-292"><code>binary-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-binary_002dport_003f-298"><code>binary-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Booleans.html#index-boolean_003f-14"><code>boolean?</code></a>: <a href="Booleans.html#Booleans">Booleans</a></li>
<li><a href="Booleans.html#index-booleans-13">booleans</a>: <a href="Booleans.html#Booleans">Booleans</a></li>
<li><a href="Strings.html#index-bytevector_002d_003estring-261"><code>bytevector->string</code></a>: <a href="Strings.html#Strings">Strings</a></li>
<li><a href="Control.html#index-bytevector_002dfor_002deach-36"><code>bytevector-for-each</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Combiners.html#index-bytevector_002dmap-139"><code>bytevector-map</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
-<li><a href="Ports.html#index-bytevector_002dport_003f-295"><code>bytevector-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-bytevector_002dport_003f-301"><code>bytevector-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Pairs-and-lists.html#index-caaaar-67"><code>caaaar</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-caaadr-68"><code>caaadr</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-caaar-59"><code>caaar</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
@@ -104,8 +104,8 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-cadddr-74"><code>cadddr</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-caddr-62"><code>caddr</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-cadr-56"><code>cadr</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
-<li><a href="Ports.html#index-call_002dwith_002dinput_002dfile-319"><code>call-with-input-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-call_002dwith_002doutput_002dfile-320"><code>call-with-output-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-call_002dwith_002dinput_002dfile-325"><code>call-with-input-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-call_002dwith_002doutput_002dfile-326"><code>call-with-output-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Continuations.html#index-call_002fcc-143"><code>call/cc</code></a>: <a href="Continuations.html#Continuations">Continuations</a></li>
<li><a href="Pairs-and-lists.html#index-car-53"><code>car</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-cdaaar-75"><code>cdaaar</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
@@ -124,18 +124,23 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-cddr-58"><code>cddr</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-cdr-54"><code>cdr</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Numbers.html#index-ceiling-215"><code>ceiling</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Characters.html#index-char_002d_003einteger-285"><code>char->integer</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Characters.html#index-char_002d_003edigit-291"><code>char->digit</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Characters.html#index-char_002d_003einteger-288"><code>char->integer</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dalphabetic_003f-278"><code>char-alphabetic?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dci_003c_003d_003f-275"><code>char-ci<=?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dci_003c_003f-274"><code>char-ci<?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dci_003d_003f-273"><code>char-ci=?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dci_003e_003d_003f-277"><code>char-ci>=?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dci_003e_003f-276"><code>char-ci>?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
-<li><a href="Characters.html#index-char_002ddowncase-284"><code>char-downcase</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Characters.html#index-char_002ddigit_003f-290"><code>char-digit?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Characters.html#index-char_002ddowncase-285"><code>char-downcase</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Characters.html#index-char_002dfoldcase-287"><code>char-foldcase</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dlower_002dcase_003f-282"><code>char-lower-case?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dnumeric_003f-279"><code>char-numeric?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
-<li><a href="Ports.html#index-char_002dready_003f-327"><code>char-ready?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Characters.html#index-char_002dupcase-283"><code>char-upcase</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Ports.html#index-char_002dready_003f-333"><code>char-ready?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Characters.html#index-char_002dtitle_002dcase_003f-283"><code>char-title-case?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Characters.html#index-char_002dtitlecase-286"><code>char-titlecase</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Characters.html#index-char_002dupcase-284"><code>char-upcase</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dupper_002dcase_003f-281"><code>char-upper-case?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_002dwhitespace_003f-280"><code>char-whitespace?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_003c_003d_003f-270"><code>char<=?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
@@ -145,11 +150,11 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Characters.html#index-char_003e_003f-271"><code>char>?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-char_003f-267"><code>char?</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Characters.html#index-characters-266">characters</a>: <a href="Characters.html#Characters">Characters</a></li>
-<li><a href="Ports.html#index-close_002dinput_002dfile-311"><code>close-input-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-close_002dinput_002dport-313"><code>close-input-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-close_002doutput_002dfile-312"><code>close-output-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-close_002doutput_002dport-314"><code>close-output-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-close_002dport-315"><code>close-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-close_002dinput_002dfile-317"><code>close-input-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-close_002dinput_002dport-319"><code>close-input-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-close_002doutput_002dfile-318"><code>close-output-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-close_002doutput_002dport-320"><code>close-output-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-close_002dport-321"><code>close-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Combiners.html#index-combiner_003f-140"><code>combiner?</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
<li><a href="Combiners.html#index-combiners-126">combiners</a>: <a href="Combiners.html#Combiners">Combiners</a></li>
<li><a href="Pairs-and-lists.html#index-cons-47"><code>cons</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
@@ -161,10 +166,11 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-copy_002des_002dimmutable_0021-50"><code>copy-es-immutable!</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Numbers.html#index-cos-225"><code>cos</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Pairs-and-lists.html#index-countable_002dlist_003f-98"><code>countable-list?</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
-<li><a href="Ports.html#index-delete_002dfile-337"><code>delete-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-delete_002dfile-343"><code>delete-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-denominator-213"><code>denominator</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Format-of-Descriptions.html#index-description-format-7">description format</a>: <a href="Format-of-Descriptions.html#Format-of-Descriptions">Format of Descriptions</a></li>
-<li><a href="Ports.html#index-display-330"><code>display</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Characters.html#index-digit_002d_003echar-292"><code>digit->char</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Ports.html#index-display-336"><code>display</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-div-187"><code>div</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-div_002dand_002dmod-189"><code>div-and-mod</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-div0-190"><code>div0</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
@@ -175,7 +181,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-encycle_0021-88"><code>encycle!</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Environments.html#index-environment_003f-106"><code>environment?</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Environments.html#index-environments-104">environments</a>: <a href="Environments.html#Environments">Environments</a></li>
-<li><a href="Ports.html#index-eof_002dobject_003f-324"><code>eof-object?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-eof_002dobject_003f-330"><code>eof-object?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Equivalence.html#index-eq_003f-21"><code>eq?</code></a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li>
<li><a href="Equivalence.html#index-equal_003f-22"><code>equal?</code></a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li>
<li><a href="Equivalence.html#index-equivalence-20">equivalence</a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li>
@@ -191,24 +197,24 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Numbers.html#index-exp-222"><code>exp</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-expt-221"><code>expt</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Continuations.html#index-extend_002dcontinuation-144"><code>extend-continuation</code></a>: <a href="Continuations.html#Continuations">Continuations</a></li>
-<li><a href="Ports.html#index-file_002dexists_003f-336"><code>file-exists?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-file_002dport_003f-293"><code>file-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-file_002dexists_003f-342"><code>file-exists?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-file_002dport_003f-299"><code>file-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Pairs-and-lists.html#index-filter-94"><code>filter</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-finite_002dlist_003f-97"><code>finite-list?</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Numbers.html#index-finite_003f-173"><code>finite?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-floor-214"><code>floor</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Ports.html#index-flush_002doutput_002dport-335"><code>flush-output-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-flush_002doutput_002dport-341"><code>flush-output-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Some-Terms.html#index-fonts-2">fonts</a>: <a href="Some-Terms.html#Some-Terms">Some Terms</a></li>
<li><a href="A-Sample-Applicative-Description.html#index-foo-11"><code>foo</code></a>: <a href="A-Sample-Applicative-Description.html#A-Sample-Applicative-Description">A Sample Applicative Description</a></li>
<li><a href="Control.html#index-for_002deach-33"><code>for-each</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Promises.html#index-force-157"><code>force</code></a>: <a href="Promises.html#Promises">Promises</a></li>
<li><a href="Numbers.html#index-gcd-201"><code>gcd</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Environments.html#index-get_002dcurrent_002denvironment-113"><code>get-current-environment</code></a>: <a href="Environments.html#Environments">Environments</a></li>
-<li><a href="Ports.html#index-get_002dcurrent_002derror_002dport-302"><code>get-current-error-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-get_002dcurrent_002dinput_002dport-300"><code>get-current-input-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-get_002dcurrent_002doutput_002dport-301"><code>get-current-output-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-get_002dcurrent_002derror_002dport-308"><code>get-current-error-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-get_002dcurrent_002dinput_002dport-306"><code>get-current-input-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-get_002dcurrent_002doutput_002dport-307"><code>get-current-output-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Pairs-and-lists.html#index-get_002dlist_002dmetrics-86"><code>get-list-metrics</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
-<li><a href="Ports.html#index-get_002dmodule-323"><code>get-module</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-get_002dmodule-329"><code>get-module</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-get_002dreal_002dexact_002dbounds-203"><code>get-real-exact-bounds</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-get_002dreal_002dexact_002dprimary-205"><code>get-real-exact-primary</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-get_002dreal_002dinternal_002dbounds-202"><code>get-real-internal-bounds</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
@@ -223,8 +229,8 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Control.html#index-inert-28">inert</a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Control.html#index-inert_003f-29"><code>inert?</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Numbers.html#index-inexact_003f-175"><code>inexact?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Ports.html#index-input_002dport_003f-289"><code>input-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Characters.html#index-integer_002d_003echar-286"><code>integer->char</code></a>: <a href="Characters.html#Characters">Characters</a></li>
+<li><a href="Ports.html#index-input_002dport_003f-295"><code>input-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Characters.html#index-integer_002d_003echar-289"><code>integer->char</code></a>: <a href="Characters.html#Characters">Characters</a></li>
<li><a href="Numbers.html#index-integer_003f-168"><code>integer?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Interpreter.html#index-interpreter-12">interpreter</a>: <a href="Interpreter.html#Interpreter">Interpreter</a></li>
<li><a href="Kernel-History.html#index-Kernel-history-1">Kernel history</a>: <a href="Kernel-History.html#Kernel-History">Kernel History</a></li>
@@ -241,7 +247,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-list_002dref-91"><code>list-ref</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-list_002dtail-87"><code>list-tail</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-lists-42">lists</a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
-<li><a href="Ports.html#index-load-321"><code>load</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-load-327"><code>load</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-log-223"><code>log</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Encapsulations.html#index-make_002dencapsulation_002dtype-154"><code>make-encapsulation-type</code></a>: <a href="Encapsulations.html#Encapsulations">Encapsulations</a></li>
<li><a href="Environments.html#index-make_002denvironment-109"><code>make-environment</code></a>: <a href="Environments.html#Environments">Environments</a></li>
@@ -263,7 +269,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-mutable_002dpair_003f-46"><code>mutable-pair?</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Strings.html#index-mutable_002dstring_003f-235"><code>mutable-string?</code></a>: <a href="Strings.html#Strings">Strings</a></li>
<li><a href="Numbers.html#index-negative_003f-194"><code>negative?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Ports.html#index-newline-329"><code>newline</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-newline-335"><code>newline</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Pairs-and-lists.html#index-nil-40">nil</a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Booleans.html#index-not_003f-15"><code>not?</code></a>: <a href="Booleans.html#Booleans">Booleans</a></li>
<li><a href="Pairs-and-lists.html#index-null_003f-44"><code>null?</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
@@ -273,41 +279,41 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Numbers.html#index-numerator-212"><code>numerator</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="A-Sample-Applicative-Description.html#index-object-descriptions-10">object descriptions</a>: <a href="A-Sample-Applicative-Description.html#A-Sample-Applicative-Description">A Sample Applicative Description</a></li>
<li><a href="Numbers.html#index-odd_003f-195"><code>odd?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Ports.html#index-open_002dbinary_002dinput_002dfile-304"><code>open-binary-input-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-open_002dbinary_002doutput_002dfile-306"><code>open-binary-output-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-open_002dinput_002dbytevector-308"><code>open-input-bytevector</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-open_002dinput_002dfile-303"><code>open-input-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-open_002dinput_002dstring-307"><code>open-input-string</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-open_002doutput_002dbytevector-310"><code>open-output-bytevector</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-open_002doutput_002dfile-305"><code>open-output-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-open_002doutput_002dstring-309"><code>open-output-string</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-open_002dbinary_002dinput_002dfile-310"><code>open-binary-input-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-open_002dbinary_002doutput_002dfile-312"><code>open-binary-output-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-open_002dinput_002dbytevector-314"><code>open-input-bytevector</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-open_002dinput_002dfile-309"><code>open-input-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-open_002dinput_002dstring-313"><code>open-input-string</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-open_002doutput_002dbytevector-316"><code>open-output-bytevector</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-open_002doutput_002dfile-311"><code>open-output-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-open_002doutput_002dstring-315"><code>open-output-string</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="A-Sample-Applicative-Description.html#index-operative-descriptions-9">operative descriptions</a>: <a href="A-Sample-Applicative-Description.html#A-Sample-Applicative-Description">A Sample Applicative Description</a></li>
<li><a href="Combiners.html#index-operative_003f-129"><code>operative?</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
<li><a href="Combiners.html#index-operatives-128">operatives</a>: <a href="Combiners.html#Combiners">Combiners</a></li>
<li><a href="Booleans.html#index-or_003f-17"><code>or?</code></a>: <a href="Booleans.html#Booleans">Booleans</a></li>
-<li><a href="Ports.html#index-output_002dport_003f-290"><code>output-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-output_002dport_003f-296"><code>output-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Pairs-and-lists.html#index-pair_003f-43"><code>pair?</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-pairs-39">pairs</a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
-<li><a href="Ports.html#index-peek_002dchar-326"><code>peek-char</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-peek_002du8-332"><code>peek-u8</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-port_002dopen_003f-296"><code>port-open?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-port_003f-288"><code>port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-ports-287">ports</a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-peek_002dchar-332"><code>peek-char</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-peek_002du8-338"><code>peek-u8</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-port_002dopen_003f-302"><code>port-open?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-port_003f-294"><code>port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-ports-293">ports</a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-positive_003f-193"><code>positive?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Printing-Notation.html#index-printing-notation-5">printing notation</a>: <a href="Printing-Notation.html#Printing-Notation">Printing Notation</a></li>
<li><a href="Promises.html#index-promise_003f-156"><code>promise?</code></a>: <a href="Promises.html#Promises">Promises</a></li>
<li><a href="Promises.html#index-promises-155">promises</a>: <a href="Promises.html#Promises">Promises</a></li>
<li><a href="Numbers.html#index-rational_003f-171"><code>rational?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-rationalize-218"><code>rationalize</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Ports.html#index-read-316"><code>read</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-read_002dchar-325"><code>read-char</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-read_002du8-331"><code>read-u8</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-read-322"><code>read</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-read_002dchar-331"><code>read-char</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-read_002du8-337"><code>read-u8</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-real_002d_003eexact-208"><code>real->exact</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-real_002d_003einexact-207"><code>real->inexact</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-real_003f-172"><code>real?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Pairs-and-lists.html#index-reduce-99"><code>reduce</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
-<li><a href="Ports.html#index-rename_002dfile-338"><code>rename-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-require-322"><code>require</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-rename_002dfile-344"><code>rename-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-require-328"><code>require</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Pairs-and-lists.html#index-reverse-85"><code>reverse</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Numbers.html#index-robust_003f-176"><code>robust?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Continuations.html#index-root_002dcontinuation-147"><code>root-continuation</code></a>: <a href="Continuations.html#Continuations">Continuations</a></li>
@@ -337,7 +343,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Control.html#index-string_002dfor_002deach-34"><code>string-for-each</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Strings.html#index-string_002dlength-248"><code>string-length</code></a>: <a href="Strings.html#Strings">Strings</a></li>
<li><a href="Combiners.html#index-string_002dmap-137"><code>string-map</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
-<li><a href="Ports.html#index-string_002dport_003f-294"><code>string-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-string_002dport_003f-300"><code>string-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Strings.html#index-string_002dref-249"><code>string-ref</code></a>: <a href="Strings.html#Strings">Strings</a></li>
<li><a href="Strings.html#index-string_002dset_0021-250"><code>string-set!</code></a>: <a href="Strings.html#Strings">Strings</a></li>
<li><a href="Strings.html#index-string_002dtitlecase-264"><code>string-titlecase</code></a>: <a href="Strings.html#Strings">Strings</a></li>
@@ -354,24 +360,24 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Symbols.html#index-symbol_003f-24"><code>symbol?</code></a>: <a href="Symbols.html#Symbols">Symbols</a></li>
<li><a href="Symbols.html#index-symbols-23">symbols</a>: <a href="Symbols.html#Symbols">Symbols</a></li>
<li><a href="Numbers.html#index-tan-226"><code>tan</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Ports.html#index-textual_002dport_003f-291"><code>textual-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-textual_002dport_003f-297"><code>textual-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-truncate-216"><code>truncate</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="Ports.html#index-u8_002dready_003f-333"><code>u8-ready?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-u8_002dready_003f-339"><code>u8-ready?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-u8_003f-170"><code>u8?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-undefined_003f-177"><code>undefined?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Combiners.html#index-unwrap-133"><code>unwrap</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
<li><a href="Strings.html#index-vector_002d_003estring-259"><code>vector->string</code></a>: <a href="Strings.html#Strings">Strings</a></li>
<li><a href="Control.html#index-vector_002dfor_002deach-35"><code>vector-for-each</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Combiners.html#index-vector_002dmap-138"><code>vector-map</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
-<li><a href="Ports.html#index-with_002derror_002dto_002dfile-299"><code>with-error-to-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-with_002dinput_002dfrom_002dfile-297"><code>with-input-from-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-with_002doutput_002dto_002dfile-298"><code>with-output-to-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-with_002derror_002dto_002dfile-305"><code>with-error-to-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-with_002dinput_002dfrom_002dfile-303"><code>with-input-from-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-with_002doutput_002dto_002dfile-304"><code>with-output-to-file</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-with_002dstrict_002darithmetic-209"><code>with-strict-arithmetic</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Combiners.html#index-wrap-132"><code>wrap</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
-<li><a href="Ports.html#index-write-317"><code>write</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-write_002dchar-328"><code>write-char</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-write_002dsimple-318"><code>write-simple</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="Ports.html#index-write_002du8-334"><code>write-u8</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-write-323"><code>write</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-write_002dchar-334"><code>write-char</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-write_002dsimple-324"><code>write-simple</code></a>: <a href="Ports.html#Ports">Ports</a></li>
+<li><a href="Ports.html#index-write_002du8-340"><code>write-u8</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-zero_003f-186"><code>zero?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
</ul><!-- Print the tables of contents -->
diff --git a/doc/html/Characters.html b/doc/html/Characters.html
@@ -90,14 +90,20 @@ respectively “alphabetic”, “numeric”, or “whitespa
<div class="defun">
— Applicative: <b>char-upper-case?</b> (<var>char-upper-case? . chars</var>)<var><a name="index-char_002dupper_002dcase_003f-281"></a></var><br>
— Applicative: <b>char-lower-case?</b> (<var>char-lower-case? . chars</var>)<var><a name="index-char_002dlower_002dcase_003f-282"></a></var><br>
-<blockquote><p> These predicates return true iff all of their arguments are
-respectively “upper case, or “lower case”.
+— Applicative: <b>char-title-case?</b> (<var>char-title-case? . chars</var>)<var><a name="index-char_002dtitle_002dcase_003f-283"></a></var><br>
+<blockquote><p>These predicates return true iff all of their arguments are
+respectively “upper case, “lower case”, or “title case”.
+
+ <p>Currently klisp only supports ASCII, so there are no title-cased
+characters (i.e. <code>char-title-case?</code> always returns false).
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>char-upcase</b> (<var>char-upcase char</var>)<var><a name="index-char_002dupcase-283"></a></var><br>
-— Applicative: <b>char-downcase</b> (<var>char-downcase char</var>)<var><a name="index-char_002ddowncase-284"></a></var><br>
-<blockquote><p> These applicatives return a character <code>char2</code> so that:
+— Applicative: <b>char-upcase</b> (<var>char-upcase char</var>)<var><a name="index-char_002dupcase-284"></a></var><br>
+— Applicative: <b>char-downcase</b> (<var>char-downcase char</var>)<var><a name="index-char_002ddowncase-285"></a></var><br>
+— Applicative: <b>char-titlecase</b> (<var>char-downcase char</var>)<var><a name="index-char_002dtitlecase-286"></a></var><br>
+— Applicative: <b>char-foldcase</b> (<var>char-downcase char</var>)<var><a name="index-char_002dfoldcase-287"></a></var><br>
+<blockquote><p>These applicatives return a character <code>char2</code> so that:
<pre class="example"> (char-ci=? char char2) ⇒ #t
</pre>
<p>If <code>char</code> is alphabetic then the following holds:
@@ -105,17 +111,56 @@ respectively “upper case, or “lower case”.
<pre class="example"> (char-upper-case? (char-upcase char)) ⇒ #t
(char-lower-case? (char-downcase char)) ⇒ #t
</pre>
- </blockquote></div>
+ <p>Currently klisp only supports ASCII, so <code>char-foldcase</code> behaves
+as <code>char-downcase</code> and <code>char-titlecase</code> behaves as
+<code>char-upcase</code>.
+</p></blockquote></div>
<div class="defun">
-— Applicative: <b>char->integer</b> (<var>char->integer char</var>)<var><a name="index-char_002d_003einteger-285"></a></var><br>
-— Applicative: <b>integer->char</b> (<var>integer->char k</var>)<var><a name="index-integer_002d_003echar-286"></a></var><br>
+— Applicative: <b>char->integer</b> (<var>char->integer char</var>)<var><a name="index-char_002d_003einteger-288"></a></var><br>
+— Applicative: <b>integer->char</b> (<var>integer->char k</var>)<var><a name="index-integer_002d_003echar-289"></a></var><br>
<blockquote><p> These applicatives convert between ASCII values (as exact integers
between 0 and 127) and characters. If an integer that is out of range
for ASCII characters is passed to <code>integer->char</code>, an error is
signaled.
</p></blockquote></div>
+<div class="defun">
+— Applicative: <b>char-digit?</b> (<var>char-digit? char </var>[<var>base</var>])<var><a name="index-char_002ddigit_003f-290"></a></var><br>
+<blockquote><p><code>base</code> must be an exact integer, between 2 and 36, it omitted it
+defaults to <code>10</code>.
+
+ <p>Applicative <code>char-digit?</code> is a predicate that returns true iff
+<code>char</code> is a digit in base <code>base</code>. If <code>base</code> is greater
+than 10, then either upper case or lower case letters can be used.
+
+ <p>SOURCE NOTE: This is like char-numeric? but with bases other than 10.
+</p></blockquote></div>
+
+<div class="defun">
+— Applicative: <b>char->digit</b> (<var>char->digit char </var>[<var>base</var>])<var><a name="index-char_002d_003edigit-291"></a></var><br>
+— Applicative: <b>digit->char</b> (<var>digit->char digit </var>[<var>base</var>])<var><a name="index-digit_002d_003echar-292"></a></var><br>
+<blockquote><p><code>base</code> must be an exact integer, between 2 and 36, it omitted it
+defaults to <code>10</code>. In <code>char->digit</code>, <code>char</code> should be a
+character such that
+ <pre class="example"> (char-digit? char base) ⇒ #t
+</pre>
+ <p>In <code>digit->char</code>, <code>digit</code> should be an exact integer such
+that
+ <pre class="example"> (>=? (- base 1) digit 0) ⇒ #t
+</pre>
+ <p>These two applicatives convert between chars representing digits and
+the corresponding integer values, in arbitrary bases (between 2 and
+36).
+
+ <p><code>char->digit</code> accepts either lower or upper case characters (if
+the base is greater than 10), <code>digit->char</code> always returns
+lower characters (or numbers of course).
+
+ <p>SOURCE NOTE: These are like r7rs digit-value but augmented with a
+base argument.
+</p></blockquote></div>
+
<!-- *-texinfo-*- -->
</body></html>
diff --git a/doc/html/Ports.html b/doc/html/Ports.html
@@ -34,7 +34,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<!-- node-name, next, previous, up -->
<h2 class="chapter">17 Ports</h2>
-<p><a name="index-ports-287"></a>
+<p><a name="index-ports-293"></a>
A port is an object that mediates data from an input or to a
destination. In the former case, the port is an input port, in the
latter case, an output port. The data itself can consist of either
@@ -58,14 +58,14 @@ normal result of a call to read). The eof type is encapsulated.
klisp and was taken from r7rs.
<div class="defun">
-— Applicative: <b>port?</b> (<var>port? . objects</var>)<var><a name="index-port_003f-288"></a></var><br>
+— Applicative: <b>port?</b> (<var>port? . objects</var>)<var><a name="index-port_003f-294"></a></var><br>
<blockquote><p> The primitive type predicate for type port. <code>port?</code>
returns true iff all the objects in <code>objects</code> are of type port.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>input-port?</b> (<var>input-port? . objects</var>)<var><a name="index-input_002dport_003f-289"></a></var><br>
-— Applicative: <b>output-port?</b> (<var>output-port? . objects</var>)<var><a name="index-output_002dport_003f-290"></a></var><br>
+— Applicative: <b>input-port?</b> (<var>input-port? . objects</var>)<var><a name="index-input_002dport_003f-295"></a></var><br>
+— Applicative: <b>output-port?</b> (<var>output-port? . objects</var>)<var><a name="index-output_002dport_003f-296"></a></var><br>
<blockquote><p> Applicative <code>input-port?</code> is a predicate that returns true
unless one or more of its arguments is not an input port. Applicative
<code>output-port?</code> is a predicate that returns true unless one or
@@ -75,8 +75,8 @@ more of its arguments is not an output port.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>textual-port?</b> (<var>textual-port? . objects</var>)<var><a name="index-textual_002dport_003f-291"></a></var><br>
-— Applicative: <b>binary-port?</b> (<var>binary-port? . objects</var>)<var><a name="index-binary_002dport_003f-292"></a></var><br>
+— Applicative: <b>textual-port?</b> (<var>textual-port? . objects</var>)<var><a name="index-textual_002dport_003f-297"></a></var><br>
+— Applicative: <b>binary-port?</b> (<var>binary-port? . objects</var>)<var><a name="index-binary_002dport_003f-298"></a></var><br>
<blockquote><p> Applicative <code>textual-port?</code> is a predicate that returns true
unless one or more of its arguments is not a textual port. Applicative
<code>binary-port?</code> is a predicate that returns true unless one or more of
@@ -88,9 +88,9 @@ its arguments is not a binary port.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>file-port?</b> (<var>file-port? . objects</var>)<var><a name="index-file_002dport_003f-293"></a></var><br>
-— Applicative: <b>string-port?</b> (<var>string-port? . objects</var>)<var><a name="index-string_002dport_003f-294"></a></var><br>
-— Applicative: <b>bytevector-port?</b> (<var>bytevector-port? . objects</var>)<var><a name="index-bytevector_002dport_003f-295"></a></var><br>
+— Applicative: <b>file-port?</b> (<var>file-port? . objects</var>)<var><a name="index-file_002dport_003f-299"></a></var><br>
+— Applicative: <b>string-port?</b> (<var>string-port? . objects</var>)<var><a name="index-string_002dport_003f-300"></a></var><br>
+— Applicative: <b>bytevector-port?</b> (<var>bytevector-port? . objects</var>)<var><a name="index-bytevector_002dport_003f-301"></a></var><br>
<blockquote><p>These applictives are predicates that returns true unless one or more
of its arguments is not file, string or bytevector port, repectively.
@@ -100,15 +100,15 @@ of its arguments is not file, string or bytevector port, repectively.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>port-open?</b> (<var>port-open? port</var>)<var><a name="index-port_002dopen_003f-296"></a></var><br>
+— Applicative: <b>port-open?</b> (<var>port-open? port</var>)<var><a name="index-port_002dopen_003f-302"></a></var><br>
<blockquote><p>Applicative <code>port-open?</code> returns true iff <code>port</code> is still
open.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>with-input-from-file</b> (<var>with-input-from-file string combiner</var>)<var><a name="index-with_002dinput_002dfrom_002dfile-297"></a></var><br>
-— Applicative: <b>with-output-to-file</b> (<var>with-output-to-file string combiner</var>)<var><a name="index-with_002doutput_002dto_002dfile-298"></a></var><br>
-— Applicative: <b>with-error-to-file</b> (<var>with-error-to-file string combiner</var>)<var><a name="index-with_002derror_002dto_002dfile-299"></a></var><br>
+— Applicative: <b>with-input-from-file</b> (<var>with-input-from-file string combiner</var>)<var><a name="index-with_002dinput_002dfrom_002dfile-303"></a></var><br>
+— Applicative: <b>with-output-to-file</b> (<var>with-output-to-file string combiner</var>)<var><a name="index-with_002doutput_002dto_002dfile-304"></a></var><br>
+— Applicative: <b>with-error-to-file</b> (<var>with-error-to-file string combiner</var>)<var><a name="index-with_002derror_002dto_002dfile-305"></a></var><br>
<blockquote><!-- add xref get-current-input-port/get-current-output-port -->
<p>These three applicatives open the file named in <code>string</code> for
textual input or output, an invoke the binder of either the
@@ -124,9 +124,9 @@ the text is still missing. The third applicative is from Scheme.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>get-current-input-port</b> (<var>get-current-input-port</var>)<var><a name="index-get_002dcurrent_002dinput_002dport-300"></a></var><br>
-— Applicative: <b>get-current-output-port</b> (<var>get-current-output-port</var>)<var><a name="index-get_002dcurrent_002doutput_002dport-301"></a></var><br>
-— Applicative: <b>get-current-error-port</b> (<var>get-current-error-port</var>)<var><a name="index-get_002dcurrent_002derror_002dport-302"></a></var><br>
+— Applicative: <b>get-current-input-port</b> (<var>get-current-input-port</var>)<var><a name="index-get_002dcurrent_002dinput_002dport-306"></a></var><br>
+— Applicative: <b>get-current-output-port</b> (<var>get-current-output-port</var>)<var><a name="index-get_002dcurrent_002doutput_002dport-307"></a></var><br>
+— Applicative: <b>get-current-error-port</b> (<var>get-current-error-port</var>)<var><a name="index-get_002dcurrent_002derror_002dport-308"></a></var><br>
<blockquote><p> These are the accessors for the input-port, output-port, and
error-port keyed dynamic variables repectively.
<!-- add xref to with-input-from-file, etc -->
@@ -137,8 +137,8 @@ the text is still missing. The third applicative is from Scheme.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>open-input-file</b> (<var>open-input-file string</var>)<var><a name="index-open_002dinput_002dfile-303"></a></var><br>
-— Applicative: <b>open-binary-input-file</b> (<var>open-binary-input-file string</var>)<var><a name="index-open_002dbinary_002dinput_002dfile-304"></a></var><br>
+— Applicative: <b>open-input-file</b> (<var>open-input-file string</var>)<var><a name="index-open_002dinput_002dfile-309"></a></var><br>
+— Applicative: <b>open-binary-input-file</b> (<var>open-binary-input-file string</var>)<var><a name="index-open_002dbinary_002dinput_002dfile-310"></a></var><br>
<blockquote><p> <code>string</code> should be the name/path for an existing file.
<p>Applicative <code>open-input-file</code> creates and returns a textual
@@ -153,8 +153,8 @@ the text is still missing. open-binary-input-file is from r7rs.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>open-output-file</b> (<var>open-output-file string</var>)<var><a name="index-open_002doutput_002dfile-305"></a></var><br>
-— Applicative: <b>open-binary-output-file</b> (<var>open-binary-output-file string</var>)<var><a name="index-open_002dbinary_002doutput_002dfile-306"></a></var><br>
+— Applicative: <b>open-output-file</b> (<var>open-output-file string</var>)<var><a name="index-open_002doutput_002dfile-311"></a></var><br>
+— Applicative: <b>open-binary-output-file</b> (<var>open-binary-output-file string</var>)<var><a name="index-open_002dbinary_002doutput_002dfile-312"></a></var><br>
<blockquote><p> <code>string</code> should be the name/path for an existing file.
<p>Applicative <code>open-output-file</code> creates and returns a textual
@@ -174,8 +174,8 @@ the text is still missing. open-binary-output-file is from r7rs.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>open-input-string</b> (<var>open-output-string string</var>)<var><a name="index-open_002dinput_002dstring-307"></a></var><br>
-— Applicative: <b>open-input-bytevector</b> (<var>open-output-bytevector bytevector</var>)<var><a name="index-open_002dinput_002dbytevector-308"></a></var><br>
+— Applicative: <b>open-input-string</b> (<var>open-output-string string</var>)<var><a name="index-open_002dinput_002dstring-313"></a></var><br>
+— Applicative: <b>open-input-bytevector</b> (<var>open-output-bytevector bytevector</var>)<var><a name="index-open_002dinput_002dbytevector-314"></a></var><br>
<blockquote><p>These applicative return a fresh input port that reads characters or
unsigned bytes from the passed sequence.
@@ -183,8 +183,8 @@ unsigned bytes from the passed sequence.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>open-output-string</b> (<var>open-output-string</var>)<var><a name="index-open_002doutput_002dstring-309"></a></var><br>
-— Applicative: <b>open-output-bytevector</b> (<var>open-output-bytevector</var>)<var><a name="index-open_002doutput_002dbytevector-310"></a></var><br>
+— Applicative: <b>open-output-string</b> (<var>open-output-string</var>)<var><a name="index-open_002doutput_002dstring-315"></a></var><br>
+— Applicative: <b>open-output-bytevector</b> (<var>open-output-bytevector</var>)<var><a name="index-open_002doutput_002dbytevector-316"></a></var><br>
<blockquote><p>These applicative return a fresh output port that accumulates
characters or unsigned bytes. The accumulated data can be obtained
via applicatives <code>get-ouput-string</code> and
@@ -194,8 +194,8 @@ via applicatives <code>get-ouput-string</code> and
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>close-input-file</b> (<var>close-input-file input-port</var>)<var><a name="index-close_002dinput_002dfile-311"></a></var><br>
-— Applicative: <b>close-output-file</b> (<var>close-output-file output-port</var>)<var><a name="index-close_002doutput_002dfile-312"></a></var><br>
+— Applicative: <b>close-input-file</b> (<var>close-input-file input-port</var>)<var><a name="index-close_002dinput_002dfile-317"></a></var><br>
+— Applicative: <b>close-output-file</b> (<var>close-output-file output-port</var>)<var><a name="index-close_002doutput_002dfile-318"></a></var><br>
<blockquote><p> These applicatives close the port argument, so that no more
input/output may be performed on them, and the resources can be
freed. If the port was already closed these applicatives have no
@@ -210,9 +210,9 @@ probably be called close-input-port & close-output-port.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>close-input-port</b> (<var>close-input-port input-port</var>)<var><a name="index-close_002dinput_002dport-313"></a></var><br>
-— Applicative: <b>close-output-port</b> (<var>close-output-port output-port</var>)<var><a name="index-close_002doutput_002dport-314"></a></var><br>
-— Applicative: <b>close-port</b> (<var>close-port port</var>)<var><a name="index-close_002dport-315"></a></var><br>
+— Applicative: <b>close-input-port</b> (<var>close-input-port input-port</var>)<var><a name="index-close_002dinput_002dport-319"></a></var><br>
+— Applicative: <b>close-output-port</b> (<var>close-output-port output-port</var>)<var><a name="index-close_002doutput_002dport-320"></a></var><br>
+— Applicative: <b>close-port</b> (<var>close-port port</var>)<var><a name="index-close_002dport-321"></a></var><br>
<blockquote><p> These applicatives close the port argument, so that no more
input/output may be performed on them, and the resources can be
freed. If the port was already closed these applicatives have no
@@ -228,7 +228,7 @@ errors and only retained here till the draft standard rectifies them
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>read</b> (<var>read </var>[<var>textual-input-port</var>])<var><a name="index-read-316"></a></var><br>
+— Applicative: <b>read</b> (<var>read </var>[<var>textual-input-port</var>])<var><a name="index-read-322"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>input-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -244,7 +244,7 @@ still missing.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>write</b> (<var>write object </var>[<var>textual-output-port</var>])<var><a name="index-write-317"></a></var><br>
+— Applicative: <b>write</b> (<var>write object </var>[<var>textual-output-port</var>])<var><a name="index-write-323"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>output-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -262,14 +262,14 @@ still missing.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>write-simple</b> (<var>write-simple object </var>[<var>port</var>])<var><a name="index-write_002dsimple-318"></a></var><br>
+— Applicative: <b>write-simple</b> (<var>write-simple object </var>[<var>port</var>])<var><a name="index-write_002dsimple-324"></a></var><br>
<blockquote><p>Applicative <code>write-simple</code> is like <code>write</code> except that it
doesn't write sharing info. It will hang if handed a cyclic structure.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>call-with-input-file</b> (<var>call-with-input-file string combiner</var>)<var><a name="index-call_002dwith_002dinput_002dfile-319"></a></var><br>
-— Applicative: <b>call-with-output-file</b> (<var>call-with-output-file string combiner</var>)<var><a name="index-call_002dwith_002doutput_002dfile-320"></a></var><br>
+— Applicative: <b>call-with-input-file</b> (<var>call-with-input-file string combiner</var>)<var><a name="index-call_002dwith_002dinput_002dfile-325"></a></var><br>
+— Applicative: <b>call-with-output-file</b> (<var>call-with-output-file string combiner</var>)<var><a name="index-call_002dwith_002doutput_002dfile-326"></a></var><br>
<blockquote><p> These applicatives open file named in <code>string</code> for textual
input/output respectively and call their <code>combiner</code> argument in a
fresh empty environment passing it as a sole operand the opened port.
@@ -281,7 +281,7 @@ still missing.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>load</b> (<var>load string</var>)<var><a name="index-load-321"></a></var><br>
+— Applicative: <b>load</b> (<var>load string</var>)<var><a name="index-load-327"></a></var><br>
<blockquote><!-- TODO add xref, open/input, read -->
<p>Applicative <code>load</code> opens the file named <code>string</code> for
textual input; reads objects from the file until the end of the file
@@ -297,14 +297,14 @@ return the value of the last evaluation.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>require</b><var><a name="index-require-322"></a></var><br>
+— Applicative: <b>require</b><var><a name="index-require-328"></a></var><br>
<blockquote><p>TODO
</p></blockquote></div>
<p>TODO
<div class="defun">
-— Applicative: <b>get-module</b> (<var>get-module string </var>[<var>environment</var>])<var><a name="index-get_002dmodule-323"></a></var><br>
+— Applicative: <b>get-module</b> (<var>get-module string </var>[<var>environment</var>])<var><a name="index-get_002dmodule-329"></a></var><br>
<blockquote><!-- TODO add xref standard-environment, open/input, read -->
<p>Applicative <code>get-module</code> creates a fresh standard environment;
opens the file named <code>string</code> for textual input; reads objects
@@ -317,7 +317,7 @@ prior to evaluating read expressions, by binding symbol
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>eof-object?</b> (<var>eof-object? . objects</var>)<var><a name="index-eof_002dobject_003f-324"></a></var><br>
+— Applicative: <b>eof-object?</b> (<var>eof-object? . objects</var>)<var><a name="index-eof_002dobject_003f-330"></a></var><br>
<blockquote><p> The primitive type predicate for type eof. <code>eof-object?</code>
returns true iff all the objects in <code>objects</code> are of type eof.
@@ -328,7 +328,7 @@ primitive type predicates.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>read-char</b> (<var>read-char </var>[<var>textual-input-port</var>])<var><a name="index-read_002dchar-325"></a></var><br>
+— Applicative: <b>read-char</b> (<var>read-char </var>[<var>textual-input-port</var>])<var><a name="index-read_002dchar-331"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>input-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -341,7 +341,7 @@ an <code>eof</code> if the end of file was reached.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>peek-char</b> (<var>peek-char </var>[<var>textual-input-port</var>])<var><a name="index-peek_002dchar-326"></a></var><br>
+— Applicative: <b>peek-char</b> (<var>peek-char </var>[<var>textual-input-port</var>])<var><a name="index-peek_002dchar-332"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>input-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -356,7 +356,7 @@ remains unchanged so that new call to <code>peek-char</code> or
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>char-ready?</b> (<var>char-ready? </var>[<var>textual-input-port</var>])<var><a name="index-char_002dready_003f-327"></a></var><br>
+— Applicative: <b>char-ready?</b> (<var>char-ready? </var>[<var>textual-input-port</var>])<var><a name="index-char_002dready_003f-333"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>input-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -371,7 +371,7 @@ the code to do this is non-portable.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>write-char</b> (<var>write-char char </var>[<var>textual-output-port</var>])<var><a name="index-write_002dchar-328"></a></var><br>
+— Applicative: <b>write-char</b> (<var>write-char char </var>[<var>textual-output-port</var>])<var><a name="index-write_002dchar-334"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>output-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -384,7 +384,7 @@ The result returned by <code>write-char</code> is inert.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>newline</b> (<var>newline </var>[<var>textal-ouput-port</var>])<var><a name="index-newline-329"></a></var><br>
+— Applicative: <b>newline</b> (<var>newline </var>[<var>textal-ouput-port</var>])<var><a name="index-newline-335"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>output-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -396,7 +396,7 @@ The result returned by <code>newline</code> is inert.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>display</b> (<var>display object </var>[<var>textual-output-port</var>])<var><a name="index-display-330"></a></var><br>
+— Applicative: <b>display</b> (<var>display object </var>[<var>textual-output-port</var>])<var><a name="index-display-336"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>output-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -411,7 +411,7 @@ within those strings and character objects are output as if by
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>read-u8</b> (<var>read-u8 </var>[<var>textual-input-port</var>])<var><a name="index-read_002du8-331"></a></var><br>
+— Applicative: <b>read-u8</b> (<var>read-u8 </var>[<var>textual-input-port</var>])<var><a name="index-read_002du8-337"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>input-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -425,7 +425,7 @@ the end of file was reached.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>peek-u8</b> (<var>peek-u8 </var>[<var>textual-input-port</var>])<var><a name="index-peek_002du8-332"></a></var><br>
+— Applicative: <b>peek-u8</b> (<var>peek-u8 </var>[<var>textual-input-port</var>])<var><a name="index-peek_002du8-338"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>input-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -441,7 +441,7 @@ same port return the same byte.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>u8-ready?</b> (<var>u8-ready? </var>[<var>textual-input-port</var>])<var><a name="index-u8_002dready_003f-333"></a></var><br>
+— Applicative: <b>u8-ready?</b> (<var>u8-ready? </var>[<var>textual-input-port</var>])<var><a name="index-u8_002dready_003f-339"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>input-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -456,7 +456,7 @@ the code to do this is non-portable.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>write-u8</b> (<var>write-u8 u8 </var>[<var>textual-output-port</var>])<var><a name="index-write_002du8-334"></a></var><br>
+— Applicative: <b>write-u8</b> (<var>write-u8 u8 </var>[<var>textual-output-port</var>])<var><a name="index-write_002du8-340"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>output-port</code> keyed dynamic variable is used. If the
port is closed, an error is signaled.
@@ -470,7 +470,7 @@ result returned by <code>write-u8</code> is inert.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>flush-output-port</b> (<var>flush-output-port </var>[<var>output-port</var>])<var><a name="index-flush_002doutput_002dport-335"></a></var><br>
+— Applicative: <b>flush-output-port</b> (<var>flush-output-port </var>[<var>output-port</var>])<var><a name="index-flush_002doutput_002dport-341"></a></var><br>
<blockquote><p> If the <code>port</code> optional argument is not specified, then the
value of the <code>output-port</code> keyed dynamic variable is used. If
the <code>port</code> is closed or if it is not an output port, an error is
@@ -484,7 +484,7 @@ output port to the underlying file or device. The result returned by
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>file-exists?</b> (<var>file-exists? string</var>)<var><a name="index-file_002dexists_003f-336"></a></var><br>
+— Applicative: <b>file-exists?</b> (<var>file-exists? string</var>)<var><a name="index-file_002dexists_003f-342"></a></var><br>
<blockquote><p> <code>string</code> should be the name/path for a file.
<p>Predicate <code>file-exists?</code> checks to see if a file named
@@ -494,7 +494,7 @@ output port to the underlying file or device. The result returned by
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>delete-file</b> (<var>delete-file string</var>)<var><a name="index-delete_002dfile-337"></a></var><br>
+— Applicative: <b>delete-file</b> (<var>delete-file string</var>)<var><a name="index-delete_002dfile-343"></a></var><br>
<blockquote><p> <code>string</code> should be the name/path for an existing file.
<p>Applicative <code>delete-file</code> deletes the file named <code>string</code>.
@@ -505,7 +505,7 @@ result returned by <code>delete-file</code> is inert.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>rename-file</b> (<var>rename-file string1 string2</var>)<var><a name="index-rename_002dfile-338"></a></var><br>
+— Applicative: <b>rename-file</b> (<var>rename-file string1 string2</var>)<var><a name="index-rename_002dfile-344"></a></var><br>
<blockquote><p> <code>string1</code> should be the name/path for an existing file,
<code>string2</code> should be the name/path for a non existing file.
diff --git a/doc/klisp.info b/doc/klisp.info
@@ -2457,11 +2457,17 @@ features defined here were taken mostly from r7rs.
-- Applicative: char-upper-case? (char-upper-case? . chars)
-- Applicative: char-lower-case? (char-lower-case? . chars)
+ -- Applicative: char-title-case? (char-title-case? . chars)
These predicates return true iff all of their arguments are
- respectively "upper case, or "lower case".
+ respectively "upper case, "lower case", or "title case".
+
+ Currently klisp only supports ASCII, so there are no title-cased
+ characters (i.e. `char-title-case?' always returns false).
-- Applicative: char-upcase (char-upcase char)
-- Applicative: char-downcase (char-downcase char)
+ -- Applicative: char-titlecase (char-downcase char)
+ -- Applicative: char-foldcase (char-downcase char)
These applicatives return a character `char2' so that:
(char-ci=? char char2) => #t
@@ -2470,6 +2476,9 @@ features defined here were taken mostly from r7rs.
(char-upper-case? (char-upcase char)) => #t
(char-lower-case? (char-downcase char)) => #t
+ Currently klisp only supports ASCII, so `char-foldcase' behaves as
+ `char-downcase' and `char-titlecase' behaves as `char-upcase'.
+
-- Applicative: char->integer (char->integer char)
-- Applicative: integer->char (integer->char k)
These applicatives convert between ASCII values (as exact integers
@@ -2477,6 +2486,37 @@ features defined here were taken mostly from r7rs.
range for ASCII characters is passed to `integer->char', an error
is signaled.
+ -- Applicative: char-digit? (char-digit? char [base])
+ `base' must be an exact integer, between 2 and 36, it omitted it
+ defaults to `10'.
+
+ Applicative `char-digit?' is a predicate that returns true iff
+ `char' is a digit in base `base'. If `base' is greater than 10,
+ then either upper case or lower case letters can be used.
+
+ SOURCE NOTE: This is like char-numeric? but with bases other than
+ 10.
+
+ -- Applicative: char->digit (char->digit char [base])
+ -- Applicative: digit->char (digit->char digit [base])
+ `base' must be an exact integer, between 2 and 36, it omitted it
+ defaults to `10'. In `char->digit', `char' should be a character
+ such that
+ (char-digit? char base) => #t
+ In `digit->char', `digit' should be an exact integer such that
+ (>=? (- base 1) digit 0) => #t
+
+ These two applicatives convert between chars representing digits
+ and the corresponding integer values, in arbitrary bases (between
+ 2 and 36).
+
+ `char->digit' accepts either lower or upper case characters (if
+ the base is greater than 10), `digit->char' always returns lower
+ characters (or numbers of course).
+
+ SOURCE NOTE: These are like r7rs digit-value but augmented with a
+ base argument.
+
File: klisp.info, Node: Ports, Next: Alphabetical Index, Prev: Characters, Up: Top
@@ -3000,18 +3040,23 @@ Index
* cddr: Pairs and lists. (line 102)
* cdr: Pairs and lists. (line 96)
* ceiling: Numbers. (line 340)
-* char->integer: Characters. (line 64)
+* char->digit: Characters. (line 91)
+* char->integer: Characters. (line 73)
* char-alphabetic?: Characters. (line 43)
* char-ci<=?: Characters. (line 37)
* char-ci<?: Characters. (line 36)
* char-ci=?: Characters. (line 35)
* char-ci>=?: Characters. (line 39)
* char-ci>?: Characters. (line 38)
-* char-downcase: Characters. (line 55)
+* char-digit?: Characters. (line 80)
+* char-downcase: Characters. (line 59)
+* char-foldcase: Characters. (line 61)
* char-lower-case?: Characters. (line 50)
* char-numeric?: Characters. (line 44)
* char-ready?: Ports. (line 283)
-* char-upcase: Characters. (line 54)
+* char-title-case?: Characters. (line 51)
+* char-titlecase: Characters. (line 60)
+* char-upcase: Characters. (line 58)
* char-upper-case?: Characters. (line 49)
* char-whitespace?: Characters. (line 45)
* char<=?: Characters. (line 29)
@@ -3041,6 +3086,7 @@ Index
* denominator: Numbers. (line 330)
* description format: Format of Descriptions.
(line 6)
+* digit->char: Characters. (line 92)
* display: Ports. (line 317)
* div: Numbers. (line 164)
* div-and-mod: Numbers. (line 166)
@@ -3102,7 +3148,7 @@ Index
* inert?: Control. (line 11)
* inexact?: Numbers. (line 98)
* input-port?: Ports. (line 32)
-* integer->char: Characters. (line 65)
+* integer->char: Characters. (line 74)
* integer?: Numbers. (line 61)
* interpreter: Interpreter. (line 6)
* Kernel history: Kernel History. (line 6)
@@ -3287,7 +3333,7 @@ Node: Keyed Variables79720
Node: Numbers82491
Node: Strings104945
Node: Characters112206
-Node: Ports115116
-Node: Alphabetical Index134564
+Node: Ports116852
+Node: Alphabetical Index136300
End Tag Table
diff --git a/doc/src/characters.texi b/doc/src/characters.texi
@@ -57,23 +57,33 @@ respectively ``alphabetic'', ``numeric'', or ``whitespace''.
@deffn Applicative char-upper-case? (char-upper-case? . chars)
@deffnx Applicative char-lower-case? (char-lower-case? . chars)
- These predicates return true iff all of their arguments are
-respectively ``upper case, or ``lower case''.
+@deffnx Applicative char-title-case? (char-title-case? . chars)
+These predicates return true iff all of their arguments are
+respectively ``upper case, ``lower case'', or ``title case''.
+
+Currently klisp only supports ASCII, so there are no title-cased
+characters (i.e. @code{char-title-case?} always returns false).
@end deffn
@deffn Applicative char-upcase (char-upcase char)
@deffnx Applicative char-downcase (char-downcase char)
- These applicatives return a character @code{char2} so that:
+@deffnx Applicative char-titlecase (char-downcase char)
+@deffnx Applicative char-foldcase (char-downcase char)
+These applicatives return a character @code{char2} so that:
@example
(char-ci=? char char2) @result{} #t
@end example
- If @code{char} is alphabetic then the following holds:
+If @code{char} is alphabetic then the following holds:
@example
(char-upper-case? (char-upcase char)) @result{} #t
(char-lower-case? (char-downcase char)) @result{} #t
@end example
+
+Currently klisp only supports ASCII, so @code{char-foldcase} behaves
+as @code{char-downcase} and @code{char-titlecase} behaves as
+@code{char-upcase}.
@end deffn
@deffn Applicative char->integer (char->integer char)
@@ -84,4 +94,39 @@ for ASCII characters is passed to @code{integer->char}, an error is
signaled.
@end deffn
+@deffn Applicative char-digit? (char-digit? char [base])
+@code{base} must be an exact integer, between 2 and 36, it omitted it
+defaults to @code{10}.
+
+Applicative @code{char-digit?} is a predicate that returns true iff
+@code{char} is a digit in base @code{base}. If @code{base} is greater
+than 10, then either upper case or lower case letters can be used.
+SOURCE NOTE: This is like char-numeric? but with bases other than 10.
+@end deffn
+
+@deffn Applicative char->digit (char->digit char [base])
+@deffnx Applicative digit->char (digit->char digit [base])
+@code{base} must be an exact integer, between 2 and 36, it omitted it
+defaults to @code{10}. In @code{char->digit}, @code{char} should be a
+character such that
+@example
+(char-digit? char base) @result{} #t
+@end example
+In @code{digit->char}, @code{digit} should be an exact integer such
+that
+@example
+(>=? (- base 1) digit 0) @result{} #t
+@end example
+
+These two applicatives convert between chars representing digits and
+the corresponding integer values, in arbitrary bases (between 2 and
+36).
+
+@code{char->digit} accepts either lower or upper case characters (if
+the base is greater than 10), @code{digit->char} always returns
+lower characters (or numbers of course).
+
+SOURCE NOTE: These are like r7rs digit-value but augmented with a
+base argument.
+@end deffn
diff --git a/src/kchar.c b/src/kchar.c
@@ -15,6 +15,7 @@ bool kchar_numericp(TValue ch) { return isdigit(chvalue(ch)) != 0; }
bool kchar_whitespacep(TValue ch) { return isspace(chvalue(ch)) != 0; }
bool kchar_upper_casep(TValue ch) { return isupper(chvalue(ch)) != 0; }
bool kchar_lower_casep(TValue ch) { return islower(chvalue(ch)) != 0; }
+bool kchar_title_casep(TValue ch) { return false; } /* only ASCII */
/* Helpers for binary typed predicates */
bool kchar_eqp(TValue ch1, TValue ch2) { return chvalue(ch1) == chvalue(ch2); }
diff --git a/src/kchar.h b/src/kchar.h
@@ -18,6 +18,7 @@ bool kchar_numericp(TValue ch);
bool kchar_whitespacep(TValue ch);
bool kchar_upper_casep(TValue ch);
bool kchar_lower_casep(TValue ch);
+bool kchar_title_casep(TValue ch);
/* Helpers for binary typed predicates */
bool kchar_eqp(TValue ch1, TValue ch2);
bool kchar_ltp(TValue ch1, TValue ch2);
diff --git a/src/kgchars.c b/src/kgchars.c
@@ -215,6 +215,8 @@ void kinit_chars_ground_env(klisp_State *K)
symbol, p2tv(kcharp), p2tv(kchar_upper_casep));
add_applicative(K, ground_env, "char-lower-case?", ftyped_predp, 3,
symbol, p2tv(kcharp), p2tv(kchar_lower_casep));
+ add_applicative(K, ground_env, "char-title-case?", ftyped_predp, 3,
+ symbol, p2tv(kcharp), p2tv(kchar_title_casep));
/* 14.1.4? char->integer, integer->char */
add_applicative(K, ground_env, "char->integer", kchar_to_integer, 0);
add_applicative(K, ground_env, "integer->char", kinteger_to_char, 0);