summaryrefslogtreecommitdiffstats
path: root/doc/apply.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/apply.n')
-rw-r--r--doc/apply.n3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/apply.n b/doc/apply.n
index 8a38aac..8fd568c 100644
--- a/doc/apply.n
+++ b/doc/apply.n
@@ -63,8 +63,10 @@ proc apply {fun args} {
}
.CE
.SH EXAMPLES
+.PP
This shows how to make a simple general command that applies a transformation
to each element of a list.
+.PP
.CS
proc map {lambda list} {
set result {}
@@ -81,6 +83,7 @@ map {x {expr {$x**2 + 3*$x - 2}}} {-4 -3 -2 -1 0 1 2 3 4}
.PP
The \fBapply\fR command is also useful for defining callbacks for use in the
\fBtrace\fR command:
+.PP
.CS
set vbl "123abc"
trace add variable vbl write {\fBapply\fR {{v1 v2 op} {