|
[Date Index]
[Thread Index]
[Author Index]
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
Prev by Date:
Re: rule based program for "Deleting repeated members of a list."
Next by Date:
Play rests using Mathematica MIDI
Previous by thread:
Re: rule based program for "Deleting repeated members of
Next by thread:
Play rests using Mathematica MIDI
|