summaryrefslogtreecommitdiff
path: root/examples/box/README
diff options
context:
space:
mode:
Diffstat (limited to 'examples/box/README')
-rw-r--r--examples/box/README16
1 files changed, 15 insertions, 1 deletions
diff --git a/examples/box/README b/examples/box/README
index 78b7762ef..fb0ef1305 100644
--- a/examples/box/README
+++ b/examples/box/README
@@ -1,8 +1,13 @@
- -*- text -*-
+ -*- outline -*-
+
+* Overview
This directory includes an example program for extending Guile with a
new (and even useful) data type.
+
+* Build Instructions
+
To build the example, simply type
make box
@@ -12,15 +17,24 @@ in this directory.
The resulting `box' program is a Guile interpreter which has one
additional data type called `box'.
+
+* The Box Data Type
+
A box is simply an object for storing one other object in. It can be
used for passing parameters by reference, for example. You simply
store an object into a box, pass it to another procedure which can
store a new object into it and thus return a value via the box.
+
+** Usage
+
Box objects are created with `make-box', set with `box-set!' and
examined with `box-ref'. See the following example session for usage
details:
+
+** Example Session
+
$ ./box
guile> (define b (make-box))
guile> b