diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-17 10:22:24 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-17 10:22:24 (GMT) |
commit | 842e3ff91428c72a2ce0d4df4889778af82f4b12 (patch) | |
tree | 5a94240e321022019f593f6bd712833ab12138c6 /doc/apply.n | |
parent | 8b464633a0f2df93912ad25af65a5724cd643da2 (diff) | |
download | tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.zip tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.gz tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.bz2 |
Improve clarity of formatting.
Diffstat (limited to 'doc/apply.n')
-rw-r--r-- | doc/apply.n | 3 |
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} { |