On Mon, May 13, 2002 at 01:39:31AM +0200, Denis Barbier wrote: > let sup_list src remove = > let rec f collected = function > | [] -> collected > | head::tail -> if List.exists (eq_line head) remove then f collected > tail else f ([EMAIL PROTECTED]) tail in > f [] src
better: let sup_list src remove = let rec f collected = function | [] -> collected | head::tail -> if List.exists (eq_line head) remove then f collected tail else f head::collected tail in List.rev (f [] src) Cheers. P.S. this is a probably a useless change while managing list short sized like ones we are using, anyway ... -- Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy [EMAIL PROTECTED] | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro "I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant!" -- G.Romney
pgpNYshXSfNYU.pgp
Description: PGP signature