Previous Up Next

6.3.16  Shifting the elements of a list

The shift command shifts the elements of a list.

Examples

shift([0,1,2,3,4])
     

0,0,1,2,3
          
shift([0,1,2,3,4],2)
     

2,3,4,0,0
          
shift([0,1,2,3,4],-2)
     

0,0,0,1,2
          

Previous Up Next