From: Nicolas C. <war...@fr...> - 2003-05-23 02:04:35
|
> I considered implementing this as an enum. But here's the problem: count > requires you to know in advance how many elements you have. The only way > I can see doing this would be to create a list of pre-converted elements > that didn't return None. A stream might be a better choice. Please remember I just added Enum.from ! --- Enum module ----- let filter_map f e = let rec next () = match f e.next with | None -> next() | Some x -> x in from next ------------------- Nicolas Cannasse |