Skip to main content

function

list

list(elements: List[Symbol]) -> Symbol

Creates a new list and fills it with elements.

This uses the mo.list.create operation. The elements must have the same type.

Args:

  • elements (List[Symbol]): The list's elements.

Returns:

The list filled with elements. It's type will be ListType.

list(type: TensorType, g: Graph) -> Symbol

Creates a new empty list of TensorType elements.

This uses the mo.list.create operation.

Args:

  • type (TensorType): The list's element type.
  • g (Graph): The Graph to add nodes to.

Returns:

A new empty list. It's type will be ListType.