Question: building a set. using op vs. union

Any semantic differences for building a set on the fly between

A:="123"; B:="456"; C:="789"; F:="10";
L1:={A,C,B};
L2:={C,F};

And

L:= L1 union L2

vs.

L:= { op(L1) , op(L2) }

They both do the same thing. Is there a reason to prefer one over the other?
 

``

A:="123"; B:="456"; C:="789"; F:="10";
L1:={A,C,B};
L2:={C,F};

"123"

"456"

"789"

"10"

{"123", "456", "789"}

{"10", "789"}

L:= L1 union L2

{"10", "123", "456", "789"}

L:= { op(L1) , op(L2) }

{"10", "123", "456", "789"}

 

Download union.mw

Please Wait...