Subject: Re: [SWIPL] Q

From: Tom Breton <[email-masked]>
Date: 16 Aug 2001 12:09:47 -0400

"Lyosha" <[email-masked]> writes:

> If [] is not a list then I would expect is_list([]) to fail. However it
> succeeds, which
> of course we can treat as an exception. :)

is_list(+Term)
    Succeeds  if Term is  bound to the  empty list ([])  or a term  with
    functor `.' and arity 2.

It's the same behavior as in Lisp, where it's a little easier to
understand.  The empty list ([] or nil) is the list terminator alone.

-- 
Tom Breton, http://world.std.com/~tob