Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: Using Map with function that has options...
  • Next by Date: FileNames subdirectory count discrepancy
  • Previous by thread: Re: simple question
  • Next by thread: Re: simple question