Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'another challenging list question' topicStudent Support Forum > General > "another challenging list question"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
04/25/12 8:49pm

I am concerned that this may not a good example to learn Mathematica from. In particular I had to torture the code to some degree to get what I think your description meant by highest first position.

In[1]:= LIST={
oldhighpos=0;(*Pretend we have no prior highest first position*)
v=Sort[Map[First,LIST[[i]]],OrderedQ[{#2,#1}]&];(*sort first positions*)
If[v[[1]]>v[[2]],(*then we really have a new highest first position*)

Out[2]= {

I do appreciate the effort you are putting into trying to be precise and clear about what you want the code to do and your concrete examples are very good. Without both of those it would be far more difficult to try to produce what you are asking for.

I expect someone can come up with a fairly simple functional programming example that will do the same thing.

URL: ,

Subject (listing for 'another challenging list question')
Author Date Posted
another challenging list question Lilly 04/24/12 4:42pm
Re: another challenging list question Bill Simpson 04/25/12 8:49pm
< Previous CommentHelp | Reply To Comment | Reply To Topic