0

in my notebook, I have a function which output is of the kind:

zzz[0,{a,b,c},{d,e,f,g},OptionsPattern]

Then, I need to use this output in another form

xxxz[a,b,c,d,e,f,g]

My initial strategy was

zzz[0,{a,b,c},{d,e,f,g},OptionsPattern] /.zzz[0,a__,OptionsPattern]->xxx@@Join[a]

It turns out however that this is not joining the two arrays as required. However, it works if using a two-step approach

zzz[0,{a,b,c},{d,e,f,g},OptionsPattern]/.zzz[0,a__,OptionsPattern]->Join[a];
xxx@@%

Does anyone know the reason? Would be possible to do so in one step? Thanks in advance!

pablo
  • 723
  • 1
  • 9
  • 17

0 Answers0