List operation 0,1 ; 1,2 ; 2,3 ; 3,4 ;........

Hey guys, 
i have a list of numbers 0,1,2,3,4,5,6,7,8,...

i want them to be split into lists as followed:

0,1 ; 1,2 ; 2,3 ; 3,4 ; 3,5 ;....

how would i do this?

thanks

  • up

    David Stasiuk

    Here's a simple way...shift, shortest list, graft + merge

    2
    • up

      Pieter Segeren

      Hi maxk, this is another way (which might be easier to understand):

      1