Previous Up Next

2.37.3  Extract a sub-list : mid

See also : at section 2.37.2.
mid is used to extract a sub-list of a list.
mid takes as argument a list, the index of the begining of the sub-list and the length of the sub-list.
mid returns the sub-list.
Input :


Output :


mid can not be used to extract a subsequence of a sequence, because the arguments of mid would be merged with the sequence. Index notation must be used, like e.g.(0,1,2,3,4,5)[2..3].

Previous Up Next