> For the complete documentation index, see [llms.txt](https://docs.openbrim.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openbrim.org/developers/paramml-developer-guide/functions/custom-function/sumllist-or-sumllist-of-list-xindex.md).

# suml(List) or suml(List of list , x\[index])

This function is designed to return the sum of a list of values or the sum of values located at specific indices within each sublist in the list.

**suml(List) → number**

This function designed to calculate the sum of a list of numeric values or elements. **suml(List of list , x\[index]) → number**

This function designed to calculate the sum of values located at specific indices within each sublist in the list.

**Example:**

```xml
<O N="sumlObject1" T="Project" Category="Functions" TransAlignRule="1">
    <!-- created by ParamML Examples on 8/21/2023 -->
    <P N="List1" V="[0,1,2,3,4,5,6,7,8,9]" />
    <P N="List2" V="[List1,List1]" />
    <P N="sumList" V="suml(List1)" />
    <P N="sumRangeList" V="suml(List2,x[3])" />
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2167636177/image-20230821-151622.png?api=v2) As demonstrated, sumList returns the total of List1 while sumRangeList returns the sum of values at index 3 within each sublist of List2. To view this example in the library, see (<https://openbrim.org/app/?incubator=1&author=ParamML_Examples_OpenBrIM+Platform&obj=objid8daihf7iq3pj36d2t4mjd> )


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openbrim.org/developers/paramml-developer-guide/functions/custom-function/sumllist-or-sumllist-of-list-xindex.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
