Question: Extracting Data out of own type

Hi there,

 

I have defined an own type MyType wich is internally just a list ['MyType', A, B] with let's say two lists A,B and the symbol 'MyType' as first element (to identify the type).

Now, if I define

X := MyType('MyType', A, B);

is there a possibility to extract A out of X by something like

X[2]

or even better X[1] (thus skipping the first one)? The only thing I know is op(2, X).

Please Wait...