Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog
AddList Method (listToAppend)
SwiPlCs interfaceSbsSW.SwiPlCsPlTermAddList(PlTerm)
Appends a list ( PlTail ) to a list by creating a new one and copy all elements
Declaration Syntax
C#Visual BasicVisual C++F#
public bool AddList(
	PlTerm listToAppend
)
Public Function AddList ( 
	listToAppend As PlTerm
) As Boolean
public:
bool AddList(
	PlTerm listToAppend
)
member AddList : 
        listToAppend : PlTerm -> bool 
Parameters
listToAppend (PlTerm)
a closed list
Return Value
Boolean
True if Succeed
Examples
 Copy imageCopy
public void List_Add_list_doc()
{
    PlTerm t = new PlTerm("[x,y]");
    PlTerm l = new PlTerm("[a,b]");

    Assert.IsTrue(l.IsList);
    Assert.IsTrue(l.AddList(t));
    Assert.IsTrue(l.IsList);
    Assert.AreEqual("[a,b,x,y]", l.ToString());
    Assert.AreEqual("a", l.NextValue().ToString());
    Assert.AreEqual("b", l.NextValue().ToString());
    Assert.AreEqual("[x,y]", l.ToString());
}

Assembly: SwiPlCs (Module: SwiPlCs.dll) Version: 1.1.60601.0 (1.1.60601.0)