F&O comments on insert function

The description of the insert function says: 

"The value returned by the function consists of all items of $target
whose index is less than or equal to N, followed by all items of
$inserts, followed by the remaining elements of $target, in that
sequence."

So, that would mean that 

insert( (1, 2, 3), 2, ("x", "y")) 

would return

(1, 2, "x", "y", 3)

That doesn't seem intuitive to me; I would expect it to be inserted one
position earlier:

(1, "x", "y", 2, 3)

Should the text say "less than N" instead of "less than or equal to N",
or was that deliberate?

Thanks,
Priscilla

Received on Wednesday, 20 November 2002 11:21:48 UTC