Date Sorting...

Michael Ruth meruth@hotmail.com
Thu, 07 Mar 2002 19:57:02 -0600


Hello,

I am pretty new to Functional programming, and I am having the following 
problem.

I need to sort a list of dates provided in an input file.  One date per 
line.. day month year is the order. And each is represented by integers 
seperated by spaces. And once the list is sorted output the results to a 
file.

I having trouble knowing where to start.  This is what I was thinking the 
best line of attack was:

--read in the lines one by one into a list

--then iterate thru the list while breaking the strings into [Int] list
-- of 3 elements [day,month,year]

--then quicksort overall list

--then print out overall list line by line


I understand this is a imperative approach, but this is the way I was taught 
how to program, well that and OOP. How do I go about writing this in a 
functional sense ? And is there another way to do this AKA another plan of 
attack ?. Thanks very much for your time and consideration.

Michael

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.