![Copy image Copy image](icons/copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog
PlTail Method (list)
SwiPlCs interface ► SbsSW.SwiPlCs ► PlTerm ► PlTail(PlTerm)
PlTail is for analysing and constructing lists. It is called PlTail as enumeration-steps make the term-reference follow the `tail' of the list.
A PlTail is created by making a new term-reference pointing to the same object. As PlTail is used to enumerate or build a Prolog list, the initial list term-reference keeps pointing to the head of the list.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ | F# |
public static PlTerm PlTail( PlTerm list )
Public Shared Function PlTail ( list As PlTerm ) As PlTerm
public: static PlTerm PlTail( PlTerm list )
static member PlTail : list : PlTerm -> PlTerm
![](collapse_all.gif)
- list (PlTerm)
- The initial PlTerm
![](collapse_all.gif)
PlTerm
A PlTerm for which is_list/1 succeed.
A PlTerm for which is_list/1 succeed.
![](collapse_all.gif)
![]() |
|
---|---|
public void List_Append() { PlTerm t = PlTerm.PlVar(); PlTerm l = PlTerm.PlTail(t); Assert.IsTrue(l.Append(new PlTerm("one")), "append one"); Assert.IsTrue(l.Append(new PlTerm("two")), "append two"); Assert.IsTrue(l.Append(new PlTerm("three")), "append three"); Assert.AreEqual(1, l.Close()); Assert.AreEqual(3, list_length(t)); Assert.AreEqual("[one,two,three]", t.ToString()); } |
Assembly: SwiPlCs (Module: SwiPlCs.dll) Version: 1.1.60605.0 (1.1.60605.0)