klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 94fbd845302765fdffc0580468fa847c3c0fbef2
parent 0cee6b3803b687f07e877637a05a1e7d976d3577
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 27 May 2011 19:21:42 -0300

Added boolean module functions to the manual.

Diffstat:
Mmanual/html/Acknowledgements.html | 3---
Mmanual/html/Index.html | 15+++++++++++++--
Mmanual/html/Introduction.html | 4++--
Mmanual/html/License.html | 2+-
Mmanual/html/index.html | 9+++++----
Mmanual/klisp.info | 94++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
Amanual/src/booleans.texi | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmanual/src/index.texi | 2+-
Mmanual/src/intro.texi | 4++--
Mmanual/src/klisp.texi | 7++++---
10 files changed, 170 insertions(+), 35 deletions(-)

diff --git a/manual/html/Acknowledgements.html b/manual/html/Acknowledgements.html @@ -39,9 +39,6 @@ borrowed from the Elisp Manual by the Free Sofware Foundation. This manual also borrows freely from both the Kernel Report and the Scheme Reports. -<!-- appendices --> -<!-- TODO --> <!-- *-texinfo-*- --> -<!-- TODO correct prev node --> </body></html> diff --git a/manual/html/Index.html b/manual/html/Index.html @@ -5,7 +5,8 @@ <meta name="description" content="klisp Reference Manual"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> -<link rel="prev" href="../index.html#dir" title="(dir)"> +<link rel="prev" href="Booleans.html#Booleans" title="Booleans"> +<link rel="next" href="../index.html#dir" title="(dir)"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- @@ -24,7 +25,8 @@ <div class="node"> <a name="Index"></a> <p> -Previous:&nbsp;<a rel="previous" accesskey="p" href="../index.html#dir">(dir)</a>, +Next:&nbsp;<a rel="next" accesskey="n" href="../index.html#dir">(dir)</a>, +Previous:&nbsp;<a rel="previous" accesskey="p" href="Booleans.html#Booleans">Booleans</a>, Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <hr> </div> @@ -33,7 +35,12 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <h2 class="unnumbered">Index</h2> <ul class="index-fn" compact> +<li><a href="Booleans.html#index-g_t_0024and_003f-17"><code>$and?</code></a>: <a href="Booleans.html#Booleans">Booleans</a></li> +<li><a href="Booleans.html#index-g_t_0024or_003f-18"><code>$or?</code></a>: <a href="Booleans.html#Booleans">Booleans</a></li> +<li><a href="Booleans.html#index-and_003f-15"><code>and?</code></a>: <a href="Booleans.html#Booleans">Booleans</a></li> <li><a href="A-Sample-Applicative-Description.html#index-applicative-descriptions-8">applicative descriptions</a>: <a href="A-Sample-Applicative-Description.html#A-Sample-Applicative-Description">A Sample Applicative Description</a></li> +<li><a href="Booleans.html#index-boolean_003f-13"><code>boolean?</code></a>: <a href="Booleans.html#Booleans">Booleans</a></li> +<li><a href="Booleans.html#index-booleans-12">booleans</a>: <a href="Booleans.html#Booleans">Booleans</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="Evaluation-Notation.html#index-documentation-notation-4">documentation notation</a>: <a href="Evaluation-Notation.html#Evaluation-Notation">Evaluation Notation</a></li> <li><a href="Error-Messages.html#index-error-message-notation-6">error message notation</a>: <a href="Error-Messages.html#Error-Messages">Error Messages</a></li> @@ -41,8 +48,10 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <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="Kernel-History.html#index-Kernel-history-1">Kernel history</a>: <a href="Kernel-History.html#Kernel-History">Kernel History</a></li> +<li><a href="Booleans.html#index-not_003f-14"><code>not?</code></a>: <a href="Booleans.html#Booleans">Booleans</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="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="Booleans.html#index-or_003f-16"><code>or?</code></a>: <a href="Booleans.html#Booleans">Booleans</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> </ul><!-- Print the tables of contents --> @@ -51,6 +60,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <ul> <li><a href="Index.html#toc_License">MIT/X11 License</a></li> <li><a href="Index.html#toc_Introduction">1 Introduction</a></li> +<li><a href="Index.html#toc_Booleans">2 Booleans</a></li> <li><a href="Index.html#toc_Index">Index</a></li> </ul> </div> @@ -76,6 +86,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> </li></ul> <li><a href="Acknowledgements.html#Acknowledgements">1.4 Acknowledgements</a> </li></ul> +<li><a name="toc_Booleans" href="Booleans.html#Booleans">2 Booleans</a> <li><a name="toc_Index" href="Index.html#Index">Index</a> </li></ul> </div> diff --git a/manual/html/Introduction.html b/manual/html/Introduction.html @@ -6,7 +6,7 @@ <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="prev" href="License.html#License" title="License"> -<link rel="next" href="../index.html#dir" title="(dir)"> +<link rel="next" href="Booleans.html#Booleans" title="Booleans"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- @@ -25,7 +25,7 @@ <div class="node"> <a name="Introduction"></a> <p> -Next:&nbsp;<a rel="next" accesskey="n" href="../index.html#dir">(dir)</a>, +Next:&nbsp;<a rel="next" accesskey="n" href="Booleans.html#Booleans">Booleans</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="License.html#License">License</a>, Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <hr> diff --git a/manual/html/License.html b/manual/html/License.html @@ -65,6 +65,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -<!-- add next node --> +<!-- next node should be types --> </body></html> diff --git a/manual/html/index.html b/manual/html/index.html @@ -35,10 +35,11 @@ Up:&nbsp;<a rel="up" accesskey="u" href="../index.html#dir">(dir)</a> <ul class="menu"> <li><a accesskey="1" href="License.html#License">License</a>: Conditions for copying and changing klisp. -<li><a accesskey="2" href="Introduction.html#Introduction">Introduction</a>: Introduction and conventions used. - -<!-- TODO --> -<li><a accesskey="3" href="Index.html#Index">Index</a>: Index including concepts, functions, variables, +<li><a accesskey="2" href="Introduction.html#Introduction">Introduction</a>: Introduction and conventions used. +<!-- TODO lisp types and other introductions --> +<li><a accesskey="3" href="Booleans.html#Booleans">Booleans</a>: Boolean module features. +<!-- TODO complete --> +<li><a accesskey="4" href="Index.html#Index">Index</a>: Index including concepts, functions, variables, and other terms. <!-- Appendices --> diff --git a/manual/klisp.info b/manual/klisp.info @@ -26,8 +26,7 @@ in part. * License:: Conditions for copying and changing klisp. * Introduction:: Introduction and conventions used. - - +* Booleans:: Boolean module features. * Index:: Index including concepts, functions, variables, and other terms. @@ -71,7 +70,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  -File: klisp.info, Node: Introduction, Next: (dir), Prev: License, Up: Top +File: klisp.info, Node: Introduction, Next: Booleans, Prev: License, Up: Top 1 Introduction ************** @@ -342,7 +341,60 @@ manual also borrows freely from both the Kernel Report and the Scheme Reports.  -File: klisp.info, Node: Index, Prev: (dir), Up: Top +File: klisp.info, Node: Booleans, Next: Index, Prev: Introduction, Up: Top + +2 Booleans +********** + +The boolean data type consists of two values, which are called true and +false, and have respectively external representations `#t' and `#f'. +There are no possible mutations of either of these two values, and the +boolean type is encapsulated. + + -- Applicative: boolean? (boolean? . objects) + The primitive type predicate for type boolean. `boolean?' returns + true iff all the objects in list are of type boolean. + + -- Applicative: not? (not? boolean) + Applicative `not?' is a predicate that returns the logical + negation of its argument. + + -- Applicative: and? (and? . booleans) + Applicative `and?' is a predicate that returns true unless one or + more of its arguments are false. + + -- Applicative: or? (or? . booleans) + Applicative `or?' is a predicate that returns false unless one or + more of its arguments are true. + + -- Operative: $and? ($and? . list) + The `$and?' operative performs a "short-circuit and" of its + operands. It evaluates them from left to right, until either an + operand evaluates to false, or the end of the list is reached. If + the end of the list is reached (which is immediate if `list' is + `nil'), the operative returns true. If an operand evaluates to + false, no further operand evaluations are performed, and the + operative returns false. If `list' is acyclic, and the last + operand is evaluated, it is evaluated as a tail context. If `list' + is cyclic, an unbounded number of operand evaluations may be + performed. If any of the operands evaluates to a non-boolean + value, an error is signaled (even if it's the last one). + + -- Operative: $or? ($or? . list) + The `$or?' operative performs a "short-circuit or" of its + operands. It evaluates them from left to right, until either an + operand evaluates to true, or the end of the list is reached. If + the end of the list is reached (which is immediate if `list' is + `nil'), the operative returns false. If an operand evaluates to + true, no further operand evaluations are performed, and the + operative returns true. If `list' is acyclic, and the last operand + is evaluated, it is evaluated as a tail context. If `list' is + cyclic, an unbounded number of operand evaluations may be + performed. If any of the operands evaluates to a non-boolean + value, an error is signaled (even if it's the last one). + + +File: klisp.info, Node: Index, Next: (dir), Prev: Booleans, Up: Top Index ***** @@ -350,8 +402,13 @@ Index * Menu: +* $and?: Booleans. (line 28) +* $or?: Booleans. (line 41) +* and?: Booleans. (line 20) * applicative descriptions: A Sample Applicative Description. (line 6) +* boolean?: Booleans. (line 12) +* booleans: Booleans. (line 6) * description format: Format of Descriptions. (line 6) * documentation notation: Evaluation Notation. (line 6) @@ -361,28 +418,31 @@ Index * foo: A Sample Applicative Description. (line 15) * Kernel history: Kernel History. (line 6) +* not?: Booleans. (line 16) * object descriptions: A Sample Applicative Description. (line 6) * operative descriptions: A Sample Applicative Description. (line 6) +* or?: Booleans. (line 24) * printing notation: Printing Notation. (line 6)  Tag Table: Node: Top302 -Node: License873 -Node: Introduction2544 -Node: Caveats5350 -Node: Kernel History6132 -Node: Conventions7570 -Node: Some Terms8240 -Node: Evaluation Notation8909 -Node: Printing Notation9650 -Node: Error Messages10126 -Node: Format of Descriptions10772 -Node: A Sample Applicative Description11335 -Node: Acknowledgements12991 -Node: Index13376 +Node: License924 +Node: Introduction2595 +Node: Caveats5404 +Node: Kernel History6186 +Node: Conventions7624 +Node: Some Terms8294 +Node: Evaluation Notation8963 +Node: Printing Notation9704 +Node: Error Messages10180 +Node: Format of Descriptions10826 +Node: A Sample Applicative Description11389 +Node: Acknowledgements13045 +Node: Booleans13430 +Node: Index15932  End Tag Table diff --git a/manual/src/booleans.texi b/manual/src/booleans.texi @@ -0,0 +1,65 @@ +@c -*-texinfo-*- +@setfilename ../src/booleans + +@node Booleans, Index, Introduction, Top +@comment node-name, next, previous, up + +@chapter Booleans +@cindex booleans + + The boolean data type consists of two values, which are called true +and false, and have respectively external representations @code{#t} +and @code{#f}. There are no possible mutations of either of these two +@c add encapsulated cross ref +values, and the boolean type is encapsulated. + +@deffn Applicative boolean? (boolean? . objects) + The primitive type predicate for type boolean. @code{boolean?} +returns true iff all the objects in list are of type boolean. +@end deffn + +@deffn Applicative not? (not? boolean) + Applicative @code{not?} is a predicate that returns the logical +negation of its argument. +@end deffn + +@deffn Applicative and? (and? . booleans) + Applicative @code{and?} is a predicate that returns true unless one +or more of its arguments are false. +@end deffn + +@deffn Applicative or? (or? . booleans) + Applicative @code{or?} is a predicate that returns false unless one +or more of its arguments are true. +@end deffn + +@deffn Operative $and? ($and? . list) + The @code{$and?} operative performs a ``short-circuit and'' of its +operands. It evaluates them from left to right, until either an +operand evaluates to false, or the end of the list is reached. If the +end of the list is reached (which is immediate if @code{list} is +@code{nil}), the operative returns true. If an operand evaluates to +false, no further operand evaluations are performed, and the operative +returns false. If @code{list} is acyclic, and the last operand is +@c TODO cross ref tail-contect +evaluated, it is evaluated as a tail context. If @code{list} is +cyclic, an unbounded number of operand evaluations may be +performed. If any of the operands evaluates to a non-boolean value, an +error is signaled (even if it's the last one). +@end deffn + +@deffn Operative $or? ($or? . list) + The @code{$or?} operative performs a ``short-circuit or'' of its +operands. It evaluates them from left to right, until either an +operand evaluates to true, or the end of the list is reached. If the +end of the list is reached (which is immediate if @code{list} is +@code{nil}), the operative returns false. If an operand evaluates to +true, no further operand evaluations are performed, and the operative +returns true. If @code{list} is acyclic, and the last operand is +@c TODO cross ref tail-contect +evaluated, it is evaluated as a tail context. If @code{list} is +cyclic, an unbounded number of operand evaluations may be +performed. If any of the operands evaluates to a non-boolean value, an +error is signaled (even if it's the last one). +@end deffn + diff --git a/manual/src/index.texi b/manual/src/index.texi @@ -2,7 +2,7 @@ @setfilename ../src/index @c TODO correct prev node -@node Index, , (dir), Top +@node Index, (dir), Booleans, Top @c this is from the elisp manual... Should read a little about this. @unnumbered Index diff --git a/manual/src/intro.texi b/manual/src/intro.texi @@ -41,8 +41,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@c add next node -@node Introduction, (dir), License, Top +@c next node should be types +@node Introduction, Booleans, License, Top @chapter Introduction klisp is an open source interpreter for the Kernel Programming diff --git a/manual/src/klisp.texi b/manual/src/klisp.texi @@ -71,9 +71,9 @@ in part. @menu * License:: Conditions for copying and changing klisp. * Introduction:: Introduction and conventions used. - -@c TODO - +@c TODO lisp types and other introductions +* Booleans:: Boolean module features. +@c TODO complete * Index:: Index including concepts, functions, variables, and other terms. @@ -84,6 +84,7 @@ in part. @end menu @include intro.texi +@include booleans.texi @c appendices @c TODO