From: Jesse G. <je...@wi...> - 2004-08-30 13:40:39
|
Nicolas Cannasse wrote: >> 1.) I probably need to write the following functions: >> >> rev_iter >> rev_map >> rev_to_list >> rev_of_list > > That's exactly what enums are good for, you should provide only one : > > val rev_enum : 'a t -> 'a Enum.t > > and then everybody can apply iter, map, fold, to_list, to_array..... (all > functional operations). It's not as efficient as distinct special purpose functions, but it should prove to be just as scalable, right? O(1) rev_enum + O(N) Enum.iter Are there any major objections to this? -- Jesse Guardiani, Systems Administrator WingNET Internet Services, P.O. Box 2605 // Cleveland, TN 37320-2605 423-559-LINK (v) 423-559-5145 (f) http://www.wingnet.net |