§ 4.53 - [lslice] Built-InMnemonic aid: lslice for one List SLICEd into another See also: [aisort] , [append] , [asort] , [clearl] , [cmap] , [dlist] , [e] , [hmap] , [isort] , [lcc] , [lcopy] , [lhsort] , [list] , [ljoin] , [llen] , [lpop] , [lset] , [lsplit] , [lsub] , [ltol] and [translate] Slices one list into another, or the same, list. sliceSpec can be any of the following, where a, b and c are integers::
Tip: When a slice component a or b is negative, then it refers to a list element relative to the end of the list. When c is negative, the step goes from the end of the list towards the beginning of the list.
[lslice sliceSpec,srcList,tgtList] [list srclist,a,b,c,d] [lslice 1:3,srclist,tgtlist] [dlist tgtlist] [list srclist,a,b,c,d] [lslice :2,srclist,tgtlist] [dlist tgtlist] [list srclist,a,b,c,d] [lslice 2,srclist,tgtlist] [dlist tgtlist] [list srclist,a,b,c,d] [lslice ::-1,srclist,tgtlist] [dlist tgtlist] bc ab c dcba
bc
ab
c
dcba
Keyboard Navigation
, Previous Page . Next Page t TOC i Index |