- Code: Select all Expand view
- function ADiff( a, b )
local c := {}
AEval( a, { | u, n | If( n > Len( b ), AAdd( c, u ),;
If( ValType( u ) != ValType( b[ n ] ), AAdd( c, u ),;
If( ! u == b[ n ], AAdd( c, u ),;
If( ValType( u ) == "A" .and. ValType( b[ n ] ) == "A", AAdd( c, ADiff( u, b[ n ] ) ), ) ) ) ) } )
AEval( b, { | u, n | If( n > Len( a ), AAdd( c, u ),) } )
return c