|  |  | 
| Navigation | 
Synopsis  Compute a sublist of a list.
 
Function   list[&T] slice(list[&T] lst, int begin, int len)
Usage   import List;
Description  Returns a sublist of  lstfrom indexstartof lengthlen.
Examples   rascal>import List; ok rascal>slice([10, 20, 30, 40, 50, 60], 2, 3); list[int]: [30,40,50] rascal>slice(["zebra", "elephant", "snake", "owl"], 1, 2); list[str]: ["elephant","snake"] Questions 
Question [1]. 
    Computing slice(L, B, N)returns a list with:
Question [2]. 
     
Question [3]. 
       |