Re: simple question
- To: mathgroup at smc.vnet.net
- Subject: [mg68680] Re: simple question
- From: "dkr" <dkrjeg at adelphia.net>
- Date: Wed, 16 Aug 2006 03:36:11 -0400 (EDT)
- References: <ebpkus$p27$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In[17]:= patternMatchReverse[lst_List]:= Flatten[Append[lst,{}]//.{x_,y___,{z___}}:>{y,{x,z}}]; In[18]:= patternMatchReverse[Range[10]] Out[18]= {10,9,8,7,6,5,4,3,2,1} dkr