kill(all)$

maxima :programming : 'firstn,rest,first' , v(i:j), ' i,j = integer j > i',version 1.0'
peter.vlasschaert@gmail.com, 17/09/2019

? firstn;

relation between list and a set
=======================

rem : set  to list => listify
          list to  set => setify

meaning : v(i:j)
v = vector
===========

given : m ,'vector'
-----------------------

m:[2,3,4,5,6,7];

mx:[1,2,3,4,5];

syntax : firstn
------------------

m1:firstn(m,3);

meaning : v(1:3)

?  How to  extract  :  v(i:j)
===================
syntax:rest,first,firstn

removes first item from  the list
------------------------------------------

m2:rest(m);

removes two items of the list
---------------------------------------

m3:rest(m,2);

meaning: v(2:4)  ?  ' matlab '
=====================
v(i:j)  , i = j = integer  , i < j

1e)  first element of a list
-----------------------------------

m4:first(m);

2e)  elements between 'i to j ' = j-i+1
--------------------------------------------------

p1:itoj(m,i,j) :=firstn(rest(m,i-1), j-i+1);

itoj(m,3,5);

info :

meaning : v(3:5),vector the elements between position 3 to 5
rem : 5 -3 +1 = 3