Previous Up Next

5.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 ‍5.3.4, Section ‍5.15.3, Section ‍5.37.1, Section ‍5.38.2, Section ‍5.55.4 and Section ‍5.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