next up previous contents index
suivant: Test if a value monter: Lists and vectors précédent: Remove elements of a   Table des matières   Index


Test if a value is in a list : member

member takes as argument a value c and a list (or a set) L.
member is a function that tests if c is an element of the list L.
member returns 0 if c is not in L, or a strictly positive integer which is 1 plus the index of the first occurence of c in L.
Note the order of the arguments (required for compatibility reasons)
Input :
member(2,[0,1,2,3,4,2])
Output :
3
Input :
member(2,%{0,1,2,3,4,2%})
Output :
3



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