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!
:>instead of->– Kuba Jan 23 '17 at 12:05RuleDelayedinstead ofRule,:>instead of->, and that might fix it. – Jason B. Jan 23 '17 at 12:05:>instead worked perfectly :D – pablo Jan 23 '17 at 12:26