Previous Up Next

6.40.6 The left and right portions of a list: left right

The left and right can find the left and right parts of a list. (See Section ‍6.3.4, Section ‍6.15.3, Section ‍6.37.1, Section ‍6.38.2, Section ‍6.55.4 and Section ‍6.55.5 for other uses of left and right.)


Example.
Input:

left([0,1,2,3,4,5,6,7,8],3)

Output:


0,1,2



Example.
Input:

right([0,1,2,3,4,5,6,7,8],4)

Output:


5,6,7,8

Previous Up Next