Mojo 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
. Its 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
): TheGraph
to add nodes to.
Returns:
A new empty list. Its type will be ListType
.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!