Method code for $list.affix()

[Turn on line numbering]
arg l1, l2;
var last, first;

// Combines l1 and l2 by appending the first element of l2 to the last
// of l1.
if (type(l2) != 'list)
    l2 = [l2];
last = (| l1.last() |) || "";
first = (| l2[1] |) || "";
l1 = [@l1.chop(), last + first];
if (l2.length() > 1)
    l1 += l2.subrange(2);
return l1;

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark