[Mono-list] Minimum element of a list

David Henderson dnadavewa at yahoo.com
Fri Jan 7 16:40:33 EST 2011


I have a list and I would like to find the minimum element in the array from the 
current iterator in a foreach loop to the end, not the minimum element overall.  
Something like the following using an STL vector in C++ (I do not expect the 
following code to compile, but rather describe the process I want to replicate 
in mono):

vector<double> d = ...;
iterator di = d.begin();
while (di != d.end())
{
  double min_e = min_element( di , d.end() );
  di++;
}

How can I accomplish this using a List and a foreach loop in mono?

Thanks!!

Dave H



      


More information about the Mono-list mailing list