The hug function itself takes a list like (a b c d) and gives back a list of 2-element lists: ((a b) (c d)). Good for pairing things up. This function itself is tolerant to an odd, unpaired element at the end: (a b c d e) gives back ((a b) (c d) (e)).
But built-in functions and macros that use hug vary in their tolerance to odd-length lists. Many of them have a default, like nil or t (which we test here); others simply fail by giving a more or less cryptic underargs error (which we also test).
The
hug
function itself takes a list like(a b c d)
and gives back a list of 2-element lists:((a b) (c d))
. Good for pairing things up. This function itself is tolerant to an odd, unpaired element at the end:(a b c d e)
gives back((a b) (c d) (e))
.But built-in functions and macros that use
hug
vary in their tolerance to odd-length lists. Many of them have a default, likenil
ort
(which we test here); others simply fail by giving a more or less crypticunderargs
error (which we also test).