|Page 194 of 800||Search internet|
A 'singleton' is a vector of length one. Singletons are useful for representing bytes.
As an example, in Unicode UTF-8, the character 'b' is represented by the byte 98 and by the singleton . In general, byte x is represented by the singleton x+256.
The vt2vector* ( x ) function converts a text x to a singleton list:
There also is a vector2vector* ( x ) function which converts a vector x to a singleton list, but there is little use for it since one can just as well use vt2vector* ( x ). Do not even expect a reward in cpu-time for using vector2vector* ( x ).
Singleton lists have two nice properties: First, they are easy to process using list processing functions. Second, they are themselves vector trees, so one can also use vector tree functions on them. They have the drawback that they take up more memory than vectors.
|Page 194 of 800||Search logiweb.eu|