MathGroup Archive 2000

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

Search the Archive

Recursion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25925] Recursion
  • From: Carlos Baeta Silva <carlos.silva at tcontas.pt>
  • Date: Thu, 9 Nov 2000 03:04:23 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello!

1. Someone can tell me how I can define a function (using recursion) that
apllies to a list of this kind:

{{"poiu", 12},{"asdfghjkl",5},{"qwerty",18},{"zxcvbnm",8}}

returns {  { {"asdfghjkl",5},{"zxcvbnm",8} }, { {"qwerty",18} },{"poiu",12}
}  } values <9.5 in one sublist and > in the other.

And apllies to {} return {{},{}}

I made this but I can put the sublists inside the empty brackets: 
 <<...>> 
 <<...>> 

2. Other function (using recursion too) that returns the parts of a list:

aplies to this {} returns {{}}
to {{1}} returns {{1},{}} or {{},{1}}
to {{1,2}} returns {{1,2},{1},{2},{}}

 Thank you very much!



  • Prev by Date: Ordering polynomials from highest to lowest order
  • Next by Date: data from mathematica to be saved in ascii format
  • Previous by thread: Re: recursion
  • Next by thread: Re: Recursion