Mercurial > hg > xemacs-beta
comparison man/lispref/sequences.texi @ 5791:9fae6227ede5
Silence texinfo 5.2 warnings, primarily by adding next, prev, and up
pointers to all nodes. See xemacs-patches message with ID
<5315f7bf.sHpFD7lXYR05GH6E%james@xemacs.org>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Thu, 27 Mar 2014 08:59:03 -0600 |
parents | 62b9ef1ed4ac |
children |
comparison
equal
deleted
inserted
replaced
5790:dcf9067f26bb | 5791:9fae6227ede5 |
---|---|
60 * Vector Functions:: Functions specifically for vectors. | 60 * Vector Functions:: Functions specifically for vectors. |
61 * Bit Vectors:: Special characteristics of XEmacs Lisp bit vectors. | 61 * Bit Vectors:: Special characteristics of XEmacs Lisp bit vectors. |
62 * Bit Vector Functions:: Functions specifically for bit vectors. | 62 * Bit Vector Functions:: Functions specifically for bit vectors. |
63 @end menu | 63 @end menu |
64 | 64 |
65 @node Sequence Functions | 65 @node Sequence Functions, Arrays, Sequences Arrays Vectors, Sequences Arrays Vectors |
66 @section Sequences | 66 @section Sequences |
67 | 67 |
68 In XEmacs Lisp, a @dfn{sequence} is either a list, a vector, a bit | 68 In XEmacs Lisp, a @dfn{sequence} is either a list, a vector, a bit |
69 vector, or a string. The common property that all sequences have is | 69 vector, or a string. The common property that all sequences have is |
70 that each is an ordered collection of elements. This section describes | 70 that each is an ordered collection of elements. This section describes |
255 If @var{sequence} is of a type that cannot hold @var{object} ( | 255 If @var{sequence} is of a type that cannot hold @var{object} ( |
256 bit-vector can only hold the integers one or zero, strings can only hold | 256 bit-vector can only hold the integers one or zero, strings can only hold |
257 characters) a @code{wrong-type-argument} error results. | 257 characters) a @code{wrong-type-argument} error results. |
258 @end defun | 258 @end defun |
259 | 259 |
260 @node Arrays | 260 @node Arrays, Array Functions, Sequence Functions, Sequences Arrays Vectors |
261 @section Arrays | 261 @section Arrays |
262 @cindex array | 262 @cindex array |
263 | 263 |
264 An @dfn{array} object has slots that hold a number of other Lisp | 264 An @dfn{array} object has slots that hold a number of other Lisp |
265 objects, called the elements of the array. Any element of an array may | 265 objects, called the elements of the array. Any element of an array may |
335 @item | 335 @item |
336 Bit vectors are printed in a way that shows the contents more clearly | 336 Bit vectors are printed in a way that shows the contents more clearly |
337 as bits. | 337 as bits. |
338 @end itemize | 338 @end itemize |
339 | 339 |
340 @node Array Functions | 340 @node Array Functions, Vectors, Arrays, Sequences Arrays Vectors |
341 @section Functions that Operate on Arrays | 341 @section Functions that Operate on Arrays |
342 | 342 |
343 In this section, we describe the functions that accept strings, vectors, | 343 In this section, we describe the functions that accept strings, vectors, |
344 and bit vectors. | 344 and bit vectors. |
345 | 345 |
426 @end defun | 426 @end defun |
427 | 427 |
428 The general sequence functions @code{copy-sequence} and @code{length} | 428 The general sequence functions @code{copy-sequence} and @code{length} |
429 are often useful for objects known to be arrays. @xref{Sequence Functions}. | 429 are often useful for objects known to be arrays. @xref{Sequence Functions}. |
430 | 430 |
431 @node Vectors | 431 @node Vectors, Vector Functions, Array Functions, Sequences Arrays Vectors |
432 @section Vectors | 432 @section Vectors |
433 @cindex vector | 433 @cindex vector |
434 | 434 |
435 Arrays in Lisp, like arrays in most languages, are blocks of memory | 435 Arrays in Lisp, like arrays in most languages, are blocks of memory |
436 whose elements can be accessed in constant time. A @dfn{vector} is a | 436 whose elements can be accessed in constant time. A @dfn{vector} is a |
465 (eq avector (eval avector)) | 465 (eq avector (eval avector)) |
466 @result{} t | 466 @result{} t |
467 @end group | 467 @end group |
468 @end example | 468 @end example |
469 | 469 |
470 @node Vector Functions | 470 @node Vector Functions, Bit Vectors, Vectors, Sequences Arrays Vectors |
471 @section Functions That Operate on Vectors | 471 @section Functions That Operate on Vectors |
472 | 472 |
473 Here are some functions that relate to vectors: | 473 Here are some functions that relate to vectors: |
474 | 474 |
475 @defun vectorp object | 475 @defun vectorp object |
560 (append avector nil) | 560 (append avector nil) |
561 @result{} (1 two (quote (three)) "four" [five]) | 561 @result{} (1 two (quote (three)) "four" [five]) |
562 @end group | 562 @end group |
563 @end example | 563 @end example |
564 | 564 |
565 @node Bit Vectors | 565 @node Bit Vectors, Bit Vector Functions, Vector Functions, Sequences Arrays Vectors |
566 @section Bit Vectors | 566 @section Bit Vectors |
567 @cindex bit vector | 567 @cindex bit vector |
568 | 568 |
569 Bit vectors are specialized vectors that can only represent arrays | 569 Bit vectors are specialized vectors that can only represent arrays |
570 of 1's and 0's. Bit vectors have a very efficient representation | 570 of 1's and 0's. Bit vectors have a very efficient representation |
582 @end example | 582 @end example |
583 | 583 |
584 Bit vectors are considered constants for evaluation, like vectors, | 584 Bit vectors are considered constants for evaluation, like vectors, |
585 strings, and numbers. @xref{Self-Evaluating Forms}. | 585 strings, and numbers. @xref{Self-Evaluating Forms}. |
586 | 586 |
587 @node Bit Vector Functions | 587 @node Bit Vector Functions, , Bit Vectors, Sequences Arrays Vectors |
588 @section Functions That Operate on Bit Vectors | 588 @section Functions That Operate on Bit Vectors |
589 | 589 |
590 Here are some functions that relate to bit vectors: | 590 Here are some functions that relate to bit vectors: |
591 | 591 |
592 @defun bit-vector-p object | 592 @defun bit-vector-p object |