MathGroup Archive 1999

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

Search the Archive

harder parts of list

  • To: mathgroup at
  • Subject: [mg15570] harder parts of list
  • From: Arnold Knopfmacher <arnoldk at>
  • Date: Tue, 26 Jan 1999 13:44:48 -0500 (EST)
  • Sender: owner-wri-mathgroup at

This seems to be a harder list parts problem. Given a list like 


I wish to select the elements in each sublist that are smaller than the
  entry in that sublist.
		So for the above lst the output should be {{2,3,1},{1},{}}. How can I
do this  with Select or Cases?

Using pattern matching this works

rule1={a_,b___,c_,d___}:>{a,b,d} /;c>a

(# //. rule1)& /@ lst


Rest /@ %


Arnold Knopfmacher
Wiws University
South Africa

  • Prev by Date: Option Inspector
  • Next by Date: Re: list of lists
  • Previous by thread: Option Inspector
  • Next by thread: Re: harder parts of list