solve x



> (%o2) %union([x = - 2], [x = 1])

> what should I do with %union()...? I want to handle the return as usual...

Functionally a %union object isn't all that much different from a list or a finite set.  The functions first, second, .. extract members of a %union object.  And
it's possible to loop over the members of a %union object:

   (%i3) l : %union(u,n,k);

   (%o3) %union(k,n,u)
   (%i4) for lk in l do print(lk);
     k
     n
     u

If you prefer lists over %union  objects,  simply substitute "[" for %union:

  (%i2) subst('%union = "[", %union([x=1],[x=2]));
  (%o2) [[x=1],[x=2]]


--Barton