/** list manipulation **/

/*K: lists; list addition */
/*A: J Gottschalk */
/*S: University of Western Australia */
/*D: October 1984 */

/*: Addl[$n,$list,$k] adds $k to $list[$n] and returns the new list */
Addl[$n,$list_=Listp[$list] & 0<$n<=Len[$list],$k] :: Cat[Ar[$n-1,$list],\
                               {$list[$n]+$k},Ar[Len[$list]-$n,$list[$n+$1]]]

_XList2[Loaded] : 1

/*E:
#I[1]::  <XList2

#I[2]::  list:{a,b,a,d,e,f}

#O[2]:   {a,b,a,d,e,f}

#I[3]::  Addl[4,list,k]

#O[3]:   {a,b,a,d + k,e,f}
*/
