from

fun from(vararg items: Term, last: Term?): List

Creates a logic list containing items, in order, terminated by last. Passing null as last makes the last of items itself the final tail (still yielding a well-formed list only if that last item is EmptyList); passing any other Term (including a Var) yields a partial list.


fun from(vararg items: Term): List
fun from(items: List<Term>): List
fun from(items: Cursor<out Term>): List

Equivalent to from with last = null.


fun from(items: Iterable<Term>, last: Term?): List

See also


fun from(items: Sequence<Term>, last: Term?): List

Creates a logic list containing items, in order, terminated by last. The list is unfolded lazily as it is consumed, which is useful for large or generated items sequences.

See also


fun from(items: List<Term>, last: Term?): List

Creates a logic list containing items, in order, terminated by last.

See also

Throws

if items is empty and last is neither null nor a List


fun from(items: Cursor<out Term>, last: Term?): List

Creates a logic list lazily unfolding the given items, terminated by last.

See also

Throws

if items is already exhausted and last is neither null nor a List