Previous Up Next

18.1.11  Accumulating terms

The accumulate_head_tail command replaces the first terms of a list by their sum and the last terms of a list by their sum.

Example

accumulate_head_tail([1,2,3,4,5,6,7,8,9,10],3,4)
     
[6,4,5,6,34]           

Previous Up Next