]> gitweb.factorcode.org Git - factor.git/blob - core/combinators/combinators-docs.factor
fix a bunch of typos in docs
[factor.git] / core / combinators / combinators-docs.factor
1 USING: arrays help.markup help.syntax strings sbufs vectors
2 kernel quotations generic generic.standard classes
3 math assocs sequences sequences.private combinators.private
4 effects words ;
5 IN: combinators
6
7 ARTICLE: "cleave-shuffle-equivalence" "Expressing shuffle words with cleave combinators"
8 "Cleave combinators are defined in terms of shuffle words, and mappings from certain shuffle idioms to cleave combinators are discussed in the documentation for " { $link bi } ", " { $link 2bi } ", " { $link 3bi } ", " { $link tri } ", " { $link 2tri } " and " { $link 3tri } "."
9 $nl
10 "Certain shuffle words can also be expressed in terms of the cleave combinators. Internalizing such identities can help with understanding and writing code using cleave combinators:"
11 { $code
12     ": keep  [ ] bi ;"
13     ": 2keep [ ] 2bi ;"
14     ": 3keep [ ] 3bi ;"
15     ""
16     ": dup   [ ] [ ] bi ;"
17     ": 2dup  [ ] [ ] 2bi ;"
18     ": 3dup  [ ] [ ] 3bi ;"
19     ""
20     ": tuck  [ nip ] [ ] 2bi ;"
21     ": swap  [ nip ] [ drop ] 2bi ;"
22     ""
23     ": over  [ ] [ drop ] 2bi ;"
24     ": pick  [ ] [ 2drop ] 3bi ;"
25     ": 2over [ ] [ drop ] 3bi ;"
26 } ;
27
28 ARTICLE: "cleave-combinators" "Cleave combinators"
29 "The cleave combinators apply multiple quotations to a single value."
30 $nl
31 "Two quotations:"
32 { $subsections
33     bi
34     2bi
35     3bi
36 }
37 "Three quotations:"
38 { $subsections
39     tri
40     2tri
41     3tri
42 }
43 "An array of quotations:"
44 { $subsections
45     cleave
46     2cleave
47     3cleave
48 }
49 $nl
50 "Technically, the cleave combinators are redundant because they can be simulated using shuffle words and other combinators, and in addition, they do not reduce token counts by much, if at all. However, they can make code more readable by expressing intention and exploiting any inherent symmetry. For example, a piece of code which performs three operations on the top of the stack can be written in one of two ways:"
51 { $code
52     "! First alternative; uses keep"
53     "[ 1 + ] keep"
54     "[ 1 - ] keep"
55     "2 *"
56     "! Second alternative: uses tri"
57     "[ 1 + ]"
58     "[ 1 - ]"
59     "[ 2 * ] tri"
60 }
61 "The latter is more aesthetically pleasing than the former."
62 $nl
63 { $subsections "cleave-shuffle-equivalence" } ;
64
65 ARTICLE: "spread-shuffle-equivalence" "Expressing shuffle words with spread combinators"
66 "Spread combinators are defined in terms of shuffle words, and mappings from certain shuffle idioms to spread combinators are discussed in the documentation for " { $link bi* } ", " { $link 2bi* } ", " { $link tri* } ", and " { $link 2tri* } "."
67 $nl
68 "Certain shuffle words can also be expressed in terms of the spread combinators. Internalizing such identities can help with understanding and writing code using spread combinators:"
69 { $code
70     ": dip   [ ] bi* ;"
71     ": 2dip  [ ] [ ] tri* ;"
72     ""
73     ": nip   [ drop ] [ ] bi* ;"
74     ": 2nip  [ drop ] [ drop ] [ ] tri* ;"
75     ""
76     ": rot"
77     "    [ [ drop ] [      ] [ drop ] tri* ]"
78     "    [ [ drop ] [ drop ] [      ] tri* ]"
79     "    [ [      ] [ drop ] [ drop ] tri* ]"
80     "    3tri ;"
81     ""
82     ": -rot"
83     "    [ [ drop ] [ drop ] [      ] tri* ]"
84     "    [ [      ] [ drop ] [ drop ] tri* ]"
85     "    [ [ drop ] [      ] [ drop ] tri* ]"
86     "    3tri ;"
87     ""
88     ": spin"
89     "    [ [ drop ] [ drop ] [      ] tri* ]"
90     "    [ [ drop ] [      ] [ drop ] tri* ]"
91     "    [ [      ] [ drop ] [ drop ] tri* ]"
92     "    3tri ;"
93 } ;
94
95 ARTICLE: "spread-combinators" "Spread combinators"
96 "The spread combinators apply multiple quotations to multiple values. In this case, " { $snippet "*" } " suffix signify spreading."
97 $nl
98 "Two quotations:"
99 { $subsections bi* 2bi* }
100 "Three quotations:"
101 { $subsections tri* 2tri* }
102 "An array of quotations:"
103 { $subsections spread }
104 "Technically, the spread combinators are redundant because they can be simulated using shuffle words and other combinators, and in addition, they do not reduce token counts by much, if at all. However, they can make code more readable by expressing intention and exploiting any inherent symmetry. For example, a piece of code which performs three operations on three related values can be written in one of two ways:"
105 { $code
106     "! First alternative; uses dip"
107     "[ [ 1 + ] dip 1 - ] dip 2 *"
108     "! Second alternative: uses tri*"
109     "[ 1 + ] [ 1 - ] [ 2 * ] tri*"
110 }
111 "A generalization of the above combinators to any number of quotations can be found in " { $link "combinators" } "."
112 $nl
113 { $subsections "spread-shuffle-equivalence" } ;
114
115 ARTICLE: "apply-combinators" "Apply combinators"
116 "The apply combinators apply a single quotation to multiple values. The " { $snippet "@" } " suffix signifies application."
117 $nl
118 "Two quotations:"
119 { $subsections bi@ 2bi@ }
120 "Three quotations:"
121 { $subsections tri@ 2tri@ }
122 "A pair of utility words built from " { $link bi@ } ":"
123 { $subsections both? either? } ;
124
125 ARTICLE: "retainstack-combinators" "Retain stack combinators"
126 "Sometimes an additional storage area is needed to hold objects. The " { $emphasis "retain stack" } " is an auxilliary stack for this purpose. Objects can be moved between the data and retain stacks using a set of combinators."
127 $nl
128 "The dip combinators invoke the quotation at the top of the stack, hiding the values underneath:"
129 { $subsections dip 2dip 3dip 4dip }
130 "The keep combinators invoke a quotation which takes a number of values off the stack, and then they restore those values:"
131 { $subsections keep 2keep 3keep } ;
132
133 ARTICLE: "curried-dataflow" "Curried dataflow combinators"
134 "Curried cleave combinators:"
135 { $subsections bi-curry tri-curry }
136 "Curried spread combinators:"
137 { $subsections bi-curry* tri-curry* }
138 "Curried apply combinators:"
139 { $subsections bi-curry@ tri-curry@ }
140 { $see-also "dataflow-combinators" } ;
141
142 ARTICLE: "compositional-examples" "Examples of compositional combinator usage"
143 "Consider printing the same message ten times:"
144 { $code ": print-10 ( -- ) 10 [ \"Hello, world.\" print ] times ;" }
145 "if we wanted to abstract out the message into a parameter, we could keep it on the stack between iterations:"
146 { $code ": print-10 ( message -- ) 10 [ dup print ] times drop ;" }
147 "However, keeping loop-invariant values on the stack doesn't always work out nicely. For example, a word to subtract a value from each element of a sequence:"
148 { $code ": subtract-n ( seq n -- seq' ) swap [ over - ] map nip ;" }
149 "Three shuffle words are required to pass the value around. Instead, the loop-invariant value can be partially applied to a quotation using " { $link curry } ", yielding a new quotation that is passed to " { $link map } ":"
150 { $example
151   ": subtract-n ( seq n -- seq' ) [ - ] curry map ;"
152   "{ 10 20 30 } 5 subtract-n ."
153   "{ 5 15 25 }"
154 }
155 "Now consider the word that is dual to the one above; instead of subtracting " { $snippet "n" } " from each stack element, it subtracts each element from " { $snippet "n" } "."
156 $nl
157 "One way to write this is with a pair of " { $link swap } "s:"
158 { $code ": n-subtract ( n seq -- seq' ) swap [ swap - ] curry map ;" }
159 "Since this pattern comes up often, " { $link with } " encapsulates it:"
160 { $example
161   ": n-subtract ( n seq -- seq' ) [ - ] with map ;"
162   "30 { 10 20 30 } n-subtract ."
163   "{ 20 10 0 }"
164 }
165 { $see-also "fry.examples" } ;
166
167 ARTICLE: "compositional-combinators" "Compositional combinators"
168 "Certain combinators transform quotations to produce a new quotation."
169 { $subsections "compositional-examples" }
170 "Fundamental operations:"
171 { $subsections curry compose }
172 "Derived operations:"
173 { $subsections 2curry 3curry with prepose }
174 "These operations run in constant time, and in many cases are optimized out altogether by the " { $link "compiler" } ". " { $link "fry" } " are an abstraction built on top of these operations, and code that uses this abstraction is often clearer than direct calls to the below words."
175 $nl
176 "Curried dataflow combinators can be used to build more complex dataflow by combining cleave, spread and apply patterns in various ways."
177 { $subsections "curried-dataflow" }
178 "Quotations also implement the sequence protocol, and can be manipulated with sequence words; see " { $link "quotations" } ". However, such runtime quotation manipulation will not be optimized by the optimizing compiler." ;
179
180 ARTICLE: "booleans" "Booleans"
181 "In Factor, any object that is not " { $link f } " has a true value, and " { $link f } " has a false value. The " { $link t } " object is the canonical true value."
182 { $subsections f t }
183 "A union class of the above:"
184 { $subsections boolean }
185 "There are some logical operations on booleans:"
186 { $subsections
187     >boolean
188     not
189     and
190     or
191     xor
192 }
193 "Boolean values are most frequently used for " { $link "conditionals" } "."
194 { $heading "The f object and f class" }
195 "The " { $link f } " object is the unique instance of the " { $link f } " class; the two are distinct objects. The latter is also a parsing word which adds the " { $link f } " object to the parse tree at parse time. To refer to the class itself you must use " { $link POSTPONE: POSTPONE: } " or " { $link POSTPONE: \ } " to prevent the parsing word from executing."
196 $nl
197 "Here is the " { $link f } " object:"
198 { $example "f ." "f" }
199 "Here is the " { $link f } " class:"
200 { $example "\\ f ." "POSTPONE: f" }
201 "They are not equal:"
202 { $example "f \\ f = ." "f" }
203 "Here is an array containing the " { $link f } " object:"
204 { $example "{ f } ." "{ f }" }
205 "Here is an array containing the " { $link f } " class:"
206 { $example "{ POSTPONE: f } ." "{ POSTPONE: f }" }
207 "The " { $link f } " object is an instance of the " { $link f } " class:"
208 { $example "USE: classes" "f class ." "POSTPONE: f" }
209 "The " { $link f } " class is an instance of " { $link word } ":"
210 { $example "USE: classes" "\\ f class ." "word" }
211 "On the other hand, " { $link t } " is just a word, and there is no class which it is a unique instance of."
212 { $example "t \\ t eq? ." "t" }
213 "Many words which search collections confuse the case of no element being present with an element being found equal to " { $link f } ". If this distinction is imporant, there is usually an alternative word which can be used; for example, compare " { $link at } " with " { $link at* } "." ;
214
215 ARTICLE: "conditionals-boolean-equivalence" "Expressing conditionals with boolean logic"
216 "Certain simple conditional forms can be expressed in a simpler manner using boolean logic."
217 $nl
218 "The following two lines are equivalent:"
219 { $code "[ drop f ] unless" "swap and" }
220 "The following two lines are equivalent:"
221 { $code "[ ] [ ] ?if" "swap or" }
222 "The following two lines are equivalent, where " { $snippet "L" } " is a literal:"
223 { $code "[ L ] unless*" "L or" } ;
224
225 ARTICLE: "conditionals" "Conditional combinators"
226 "The basic conditionals:"
227 { $subsections if when unless }
228 "Forms abstracting a common stack shuffle pattern:"
229 { $subsections if* when* unless* }
230 "Another form abstracting a common stack shuffle pattern:"
231 { $subsections ?if }
232 "Sometimes instead of branching, you just need to pick one of two values:"
233 { $subsections ? }
234 "Two combinators which abstract out nested chains of " { $link if } ":"
235 { $subsections cond case }
236 { $subsections "conditionals-boolean-equivalence" }
237 { $see-also "booleans" "bitwise-arithmetic" both? either? } ;
238
239 ARTICLE: "dataflow-combinators" "Data flow combinators"
240 "Data flow combinators pass values between quotations:"
241 { $subsections
242     "retainstack-combinators"
243     "cleave-combinators"
244     "spread-combinators"
245     "apply-combinators"
246 }
247 { $see-also "curried-dataflow" } ;
248
249 ARTICLE: "combinators-quot" "Quotation construction utilities"
250 "Some words for creating quotations which can be useful for implementing method combinations and compiler transforms:"
251 { $subsections cond>quot case>quot alist>quot } ;
252
253 ARTICLE: "call-unsafe" "Unsafe combinators"
254 "Unsafe calls declare an effect statically without any runtime checking:"
255 { $subsections call-effect-unsafe execute-effect-unsafe } ;
256
257 ARTICLE: "call" "Fundamental combinators"
258 "The most basic combinators are those that take either a quotation or word, and invoke it immediately."
259 $nl
260 "There are two sets of combinators; they differ in whether or not the stack effect of the expected code is declared."
261 $nl
262 "The simplest combinators do not take an effect declaration. The compiler checks the stack effect at compile time, rejecting the program if this cannot be done:"
263 { $subsections call execute }
264 "The second set of combinators takes an effect declaration. Note that the opening parenthesis is actually part of the word name; these are parsing words, and they read a stack effect until the corresponding closing parenthesis. The stack effect of the quotation or word is then checked at runtime:"
265 { $subsections POSTPONE: call( POSTPONE: execute( }
266 "The above are syntax sugar. The underlying words are a bit more verbose but allow non-constant effects to be passed in:"
267 { $subsections call-effect execute-effect }
268 "The combinator variants that do not take an effect declaration can only be used if the compiler is able to infer the stack effect by other means. See " { $link "inference-combinators" } "."
269 { $subsections "call-unsafe" }
270 { $see-also "effects" "inference" } ;
271
272 ARTICLE: "combinators" "Combinators"
273 "A central concept in Factor is that of a " { $emphasis "combinator" } ", which is a word taking code as input."
274 { $subsections
275     "call"
276     "dataflow-combinators"
277     "conditionals"
278     "looping-combinators"
279     "compositional-combinators"
280     "combinators.short-circuit"
281     "combinators.smart"
282     "combinators-quot"
283     "generalizations"
284 }
285 "More combinators are defined for working on data structures, such as " { $link "sequences-combinators" } " and " { $link "assocs-combinators" } "."
286 { $see-also "quotations" } ;
287
288 ABOUT: "combinators"
289
290 HELP: call-effect
291 { $values { "quot" quotation } { "effect" effect } }
292 { $description "Given a quotation and a stack effect, calls the quotation, asserting at runtime that it has the given stack effect. This is a macro which expands given a literal effect parameter, and an arbitrary quotation which is not required at compile time." }
293 { $examples
294   "The following two lines are equivalent:"
295   { $code
296     "call( a b -- c )"
297     "(( a b -- c )) call-effect"
298   }
299 } ;
300
301 HELP: execute-effect
302 { $values { "word" word } { "effect" effect } }
303 { $description "Given a word and a stack effect, executes the word, asserting at runtime that it has the given stack effect. This is a macro which expands given a literal effect parameter, and an arbitrary word which is not required at compile time." }
304 { $examples
305   "The following two lines are equivalent:"
306   { $code
307     "execute( a b -- c )"
308     "(( a b -- c )) execute-effect"
309   }
310 } ;
311
312 HELP: execute-effect-unsafe
313 { $values { "word" word } { "effect" effect } }
314 { $description "Given a word and a stack effect, executes the word, blindly declaring at runtime that it has the given stack effect. This is a macro which expands given a literal effect parameter, and an arbitrary word which is not required at compile time." }
315 { $warning "If the word being executed has an incorrect stack effect, undefined behavior will result. User code should use " { $link POSTPONE: execute( } " instead." } ;
316     
317 { call-effect call-effect-unsafe execute-effect execute-effect-unsafe } related-words
318
319 HELP: cleave
320 { $values { "x" object } { "seq" "a sequence of quotations with stack effect " { $snippet "( x -- ... )" } } }
321 { $description "Applies each quotation to the object in turn." }
322 { $examples
323     "The " { $link bi } " combinator takes one value and two quotations; the " { $link tri } " combinator takes one value and three quotations. The " { $link cleave } " combinator takes one value and any number of quotations, and is essentially equivalent to a chain of " { $link keep } " forms:"
324     { $code
325         "! Equivalent"
326         "{ [ p ] [ q ] [ r ] [ s ] } cleave"
327         "[ p ] keep [ q ] keep [ r ] keep s"
328     }
329 } ;
330
331 HELP: 2cleave
332 { $values { "x" object } { "y" object }
333           { "seq" "a sequence of quotations with stack effect " { $snippet "( x y -- ... )" } } }
334 { $description "Applies each quotation to the two objects in turn." } ;
335
336 HELP: 3cleave
337 { $values { "x" object } { "y" object } { "z" object }
338           { "seq" "a sequence of quotations with stack effect " { $snippet "( x y z -- ... )" } } }
339 { $description "Applies each quotation to the three objects in turn." } ;
340
341 { bi tri cleave } related-words
342
343 HELP: spread
344 { $values { "objs..." "objects" } { "seq" "a sequence of quotations with stack effect " { $snippet "( x -- ... )" } } }
345 { $description "Applies each quotation to the object in turn." }
346 { $examples
347     "The " { $link bi* } " combinator takes two values and two quotations; the " { $link tri* } " combinator takes three values and three quotations. The " { $link spread } " combinator takes " { $snippet "n" } " values and " { $snippet "n" } " quotations, where " { $snippet "n" } " is the length of the input sequence, and is essentially equivalent to series of retain stack manipulations:"
348     { $code
349         "! Equivalent"
350         "{ [ p ] [ q ] [ r ] [ s ] } spread"
351         "[ [ [ p ] dip q ] dip r ] dip s"
352     }
353 } ;
354
355 { bi* tri* spread } related-words
356
357 HELP: to-fixed-point
358 { $values { "object" object } { "quot" { $quotation "( object(n) -- object(n+1) )" } } { "object(n)" object } }
359 { $description "Applies the quotation repeatedly with " { $snippet "object" } " as the initial input until the output of the quotation equals the input." }
360 { $examples
361     { $example
362         "USING: combinators kernel math prettyprint sequences ;"
363         "IN: scratchpad"
364         ": flatten ( sequence -- sequence' )"
365         "    \"flatten\" over index"
366         "    [ [ 1 + swap nth ] [ nip dup 2 + ] [ drop ] 2tri replace-slice ] when* ;"
367         ""
368         "{ \"flatten\" { 1 { 2 3 } \"flatten\" { 4 5 } { 6 } } } [ flatten ] to-fixed-point ."
369         "{ 1 { 2 3 } 4 5 { 6 } }"
370     }
371 } ;
372
373 HELP: alist>quot
374 { $values { "default" "a quotation" } { "assoc" "a sequence of quotation pairs" } { "quot" "a new quotation" } }
375 { $description "Constructs a quotation which calls the first quotation in each pair of " { $snippet "assoc" } " until one of them outputs a true value, and then calls the second quotation in the corresponding pair. Quotations are called in reverse order, and if no quotation outputs a true value then " { $snippet "default" } " is called." }
376 { $notes "This word is used to implement compile-time behavior for " { $link cond } ", and it is also used by the generic word system. Note that unlike " { $link cond } ", the constructed quotation performs the tests starting from the end and not the beginning." } ;
377
378 HELP: cond
379 { $values { "assoc" "a sequence of quotation pairs and an optional quotation" } }
380 { $description
381     "Calls the second quotation in the first pair whose first quotation yields a true value. A single quotation will always yield a true value."
382     $nl
383     "The following two phrases are equivalent:"
384     { $code "{ { [ X ] [ Y ] } { [ Z ] [ T ] } } cond" }
385     { $code "X [ Y ] [ Z [ T ] [ no-cond ] if ] if" }
386 }
387 { $errors "Throws a " { $link no-cond } " error if none of the test quotations yield a true value." }
388 { $examples
389     { $code
390         "{"
391         "    { [ dup 0 > ] [ \"positive\" ] }"
392         "    { [ dup 0 < ] [ \"negative\" ] }"
393         "    [ \"zero\" ]"
394         "} cond"
395     }
396 } ;
397
398 HELP: no-cond
399 { $description "Throws a " { $link no-cond } " error." }
400 { $error-description "Thrown by " { $link cond } " if none of the test quotations yield a true value. Some uses of " { $link cond } " include a default case where the test quotation is " { $snippet "[ t ]" } "; such a " { $link cond } " form will never throw this error." } ;
401
402 HELP: case
403 { $values { "obj" object } { "assoc" "a sequence of object/word,quotation pairs, with an optional quotation at the end" } }
404 { $description
405     "Compares " { $snippet "obj" } " against the first element of every pair, first evaluating the first element if it is a word. If some pair matches, removes " { $snippet "obj" } " from the stack and calls the second element of that pair, which must be a quotation."
406     $nl
407     "If there is no case matching " { $snippet "obj" } ", the default case is taken. If the last element of " { $snippet "cases" } " is a quotation, the quotation is called with " { $snippet "obj" } " on the stack. Otherwise, a " { $link no-cond } " error is rasied."
408     $nl
409     "The following two phrases are equivalent:"
410     { $code "{ { X [ Y ] } { Z [ T ] } } case" }
411     { $code "dup X = [ drop Y ] [ dup Z = [ drop T ] [ no-case ] if ] if" }
412 }
413 { $examples
414     { $code
415         "SYMBOL: yes  SYMBOL: no  SYMBOL: maybe"
416         "maybe {"
417         "    { yes [ ] } ! Do nothing"
418         "    { no [ \"No way!\" throw ] }"
419         "    { maybe [ \"Make up your mind!\" print ] }"
420         "    [ \"Invalid input; try again.\" print ]"
421         "} case"
422     }
423 } ;
424
425 HELP: no-case
426 { $description "Throws a " { $link no-case } " error." }
427 { $error-description "Thrown by " { $link case } " if the object at the top of the stack does not match any case, and no default case is given." } ;
428
429 HELP: recursive-hashcode
430 { $values { "n" integer } { "obj" object } { "quot" { $quotation "( n obj -- code )" } } { "code" integer } }
431 { $description "A combinator used to implement methods for the " { $link hashcode* } " generic word. If " { $snippet "n" } " is less than or equal to zero, outputs 0, otherwise calls the quotation." } ;
432
433 HELP: cond>quot
434 { $values { "assoc" "a sequence of pairs of quotations" } { "quot" quotation } }
435 { $description  "Creates a quotation that when called, has the same effect as applying " { $link cond } " to " { $snippet "assoc" } "."
436 $nl
437 "The generated quotation is more efficient than the naive implementation of " { $link cond } ", though, since it expands into a series of conditionals, and no iteration through " { $snippet "assoc" } " has to be performed." }
438 { $notes "This word is used behind the scenes to compile " { $link cond } " forms efficiently; it can also be called directly,  which is useful for meta-programming." } ;
439
440 HELP: case>quot
441 { $values { "default" quotation } { "assoc" "a sequence of pairs of quotations" } { "quot" quotation } }
442 { $description "Creates a quotation that when called, has the same effect as applying " { $link case } " to " { $snippet "assoc" } "."
443 $nl
444 "This word uses three strategies:"
445 { $list
446     "If the assoc only has a few keys, a linear search is generated."
447     { "If the assoc has a large number of keys which form a contiguous range of integers, a direct dispatch is generated using the " { $link dispatch } " word together with a bounds check." }
448     "Otherwise, an open-coded hashtable dispatch is generated."
449 } } ;
450
451 HELP: distribute-buckets
452 { $values { "alist" "an alist" } { "initial" object } { "quot" { $quotation "( obj -- assoc )" } } { "buckets" "a new array" } }
453 { $description "Sorts the entries of " { $snippet "assoc" } " into buckets, using the quotation to yield a set of keys for each entry. The hashcode of each key is computed, and the entry is placed in all corresponding buckets. Each bucket is initially cloned from " { $snippet "initial" } "; this should either be an empty vector or a one-element vector containing a pair." }
454 { $notes "This word is used in the implemention of " { $link hash-case-quot } " and " { $link standard-combination } "." } ;
455
456 HELP: dispatch ( n array -- )
457 { $values { "n" "a fixnum" } { "array" "an array of quotations" } }
458 { $description "Calls the " { $snippet "n" } "th quotation in the array." }
459 { $warning "This word is in the " { $vocab-link "kernel.private" } " vocabulary because it is an implementation detail used by the generic word system to accelerate method dispatch. It does not perform type or bounds checks, and user code should not need to call it directly." } ;