Re: Riffle[] accepts only lists. Why?
- To: mathgroup at smc.vnet.net
- Subject: [mg81949] Re: Riffle[] accepts only lists. Why?
- From: Mark Fisher <particlefilter at gmail.com>
- Date: Sun, 7 Oct 2007 05:36:31 -0400 (EDT)
- References: <fe7hq1$op2$1@smc.vnet.net>
On Oct 6, 4:42 am, Szabolcs Horv=E1t <szhor... at gmail.com> wrote: > Why does Riffle[] accept only lists as its first argument? All other > list-manipulation functions, like Append[], Insert[], Cases[] etc. work > on all kinds of expressions, not just lists. This seems like an > unnecessary restriction on Riffle[]. > > Szabolcs Good question. In the meantime, try Fiffle[f_[args___], x_] := f @@ Riffle[{args}, x] Fiffle[f[a,b,c],x] --Mark