next up previous contents index
suivant: Get the first element monter: Lists and vectors précédent: Extract a sub-list   Table des matières   Index


Extract a sub-list : mid

See also : at section 1.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 :
mid([0,1,2,3,4,5],2,3)
Output :
[1,2,3]
Warning
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].



giac documentation written by Renée De Graeve and Bernard Parisse