The “Quick reference” appendix states that when using
(collect words), “printed words are diverted into
$List, possibly out of order”.
Does that mean that the order is undefined? As in,
(collect word) Hello World (into $List)
could result in
$List containing either
[hello world] or
[world hello], with no way of knowing in advance?
Because in section “Collecting words” of chapter “Choice points”, no mention of the order is made, implying that it is kept. The example also implies that collecting
Hello, world! will always result in
[hello , world!].
The following post also seems to imply that the order is kept.
For example, a use case would be to determine if the first word of the name of an object (or any output from any predicate, really) starts with a vowel, and I’m now wondering if it’s safe to use
(collect words) for that.