==== ΣLIST ==== ---- Return the sum of all elements in a list ---- ^ __Input Stack__ ^ ^ __Output Stack__ ^ | **Ldata** | **→** | **Osum** | | //Level 1// | //→// | //Level 1// | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} | **Keyword type** | [[manual:chapter5:basics#commands|Command]] || | **Parallel list processing capabilities** | [[manual:chapter5:listproc#group-2commands-that-must-use-dolist-to-parallel-process|Group 2]] | //Commands that must use //''[[manual:chapter6:lists:cmd_cmddolist|DOLIST]]''// to parallel process// | | **Affected by flags** | //None// || ---- The ''ΣLIST'' command returns the sum of all the elements in **Ldata**, i.e.: $$ \sum_{k=1}^{n}{data_{k}} $$ The list must not be empty and its elements must be suitable for mutual addition. ---- ''ΣLIST'' is not fully equivalent to its **userRPL** counterpart. In particular: * in **userRPL** the list must contain at least two elements. ---- **__Input__** 4: 3: 2: 1: { 1 'X' '3*Y' } ………………………………………………………………………………………………………… ΣLIST \\ **__Output__** 4: 3: 2: 1: '1+X+3*Y' ………………………………………………………………………………………………………… ---- {{page>manual:chapter6:lists&nofooter&noeditbtn&inline}}