diff man/lispref/sequences.texi @ 5361:62b9ef1ed4ac

Change "special form" to "special operator" in the manuals, too 2011-03-01 Aidan Kehoe <kehoea@parhasard.net> * lispref/commands.texi (Using Interactive): * lispref/compile.texi (Eval During Compile): * lispref/compile.texi (Compiled-Function Objects): * lispref/control.texi (Sequencing): * lispref/control.texi (Conditionals): * lispref/control.texi (Combining Conditions): * lispref/control.texi (Iteration): * lispref/control.texi (Catch and Throw): * lispref/control.texi (Handling Errors): * lispref/control.texi (Cleanups): * lispref/display.texi (Temporary Displays): * lispref/eval.texi (Quoting): * lispref/eval.texi (Multiple values): * lispref/frames.texi (Input Focus): * lispref/functions.texi (Argument List): * lispref/functions.texi (Defining Functions): * lispref/functions.texi (Anonymous Functions): * lispref/internationalization.texi (Level 3 Primitives): * lispref/internationalization.texi (Domain Specification): * lispref/intro.texi (A Sample Function Description): * lispref/intro.texi (A Sample Variable Description): * lispref/lists.texi (Sets And Lists): * lispref/macros.texi (Defining Macros): * lispref/macros.texi (Backquote): * lispref/positions.texi (Excursions): * lispref/positions.texi (Narrowing): * lispref/searching.texi (Saving Match Data): * lispref/sequences.texi (Sequence Functions): * lispref/sequences.texi (Array Functions): * lispref/specifiers.texi (Adding Specifications): * lispref/variables.texi (Local Variables): * lispref/variables.texi (Defining Variables): * lispref/variables.texi (Setting Variables): * lispref/variables.texi (Default Value): * lispref/windows.texi (Selecting Windows): * lispref/windows.texi (Window Configurations): No longer use @defspec, since we no longer use the term "special form"; instead use @deffn {Special Operator}. Unfortunately there's no way in texinfo to redefine @defspec in one place.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 01 Mar 2011 14:18:45 +0000
parents 576fb035e263
children 9fae6227ede5
line wrap: on
line diff
--- a/man/lispref/sequences.texi	Sat Feb 19 11:03:46 2011 +0000
+++ b/man/lispref/sequences.texi	Tue Mar 01 14:18:45 2011 +0000
@@ -219,6 +219,44 @@
 @code{nth} (@pxref{List Elements}).
 @end defun
 
+@defun fill sequence object @t{&key :start :end}
+This function fills the sequence @var{sequence} with @var{object}, so
+that each element of @var{sequence} between the indices specified by
+@code{:start} (inclusive) and @code{:end} (exclusive), is @var{object}.
+It returns @var{sequence}.
+
+@example
+@group
+(setq a [a b c d e f g])
+     @result{} [a b c d e f g]
+(fill a 0 :end 2)
+     @result{} [0 0 c d e f g]
+(fill a 0)
+     @result{} [0 0 0 0 0 0 0]
+a
+     @result{} [0 0 0 0 0 0 0]
+@end group
+
+@group
+(setq s "When in the course")
+     @result{} "When in the course"
+(fill s ?-)
+     @result{} "------------------"
+@end group
+
+@group
+(setq bv #*1101)
+     @result{} #*1101
+(fill bv 0)
+     @result{} #*0000
+@end group
+@end example
+
+If @var{sequence} is of a type that cannot hold @var{object} (
+bit-vector can only hold the integers one or zero, strings can only hold
+characters) a @code{wrong-type-argument} error results.
+@end defun
+
 @node Arrays
 @section Arrays
 @cindex array
@@ -387,39 +425,6 @@
 @code{wrong-type-argument} error results.
 @end defun
 
-@defun fillarray array object
-This function fills the array @var{array} with @var{object}, so that
-each element of @var{array} is @var{object}.  It returns @var{array}.
-
-@example
-@group
-(setq a [a b c d e f g])
-     @result{} [a b c d e f g]
-(fillarray a 0)
-     @result{} [0 0 0 0 0 0 0]
-a
-     @result{} [0 0 0 0 0 0 0]
-@end group
-
-@group
-(setq s "When in the course")
-     @result{} "When in the course"
-(fillarray s ?-)
-     @result{} "------------------"
-@end group
-
-@group
-(setq bv #*1101)
-     @result{} #*1101
-(fillarray bv 0)
-     @result{} #*0000
-@end group
-@end example
-
-If @var{array} is a string and @var{object} is not a character, a
-@code{wrong-type-argument} error results.
-@end defun
-
 The general sequence functions @code{copy-sequence} and @code{length}
 are often useful for objects known to be arrays.  @xref{Sequence Functions}.