4.38 How to check that all entries in a list have the same type?

Given a list, we need to check that all entries are same type, say `=`. But the type can be anything.

One way is to use andmap with the type function. Here is an example

restart; 
L:=[3+x=0, 2+y(x)-3=0, 5=0, 7*x=2]; 
#check all entries are of type `=` 
andmap(X->type(X,`=`),L); 
 
   #true 
 
L:=[3+x=0, 2+y(x)-3=0, 5]; 
andmap(X->type(X,`=`),L); 
 
   #false