[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Buglet in ocaml-ldconf



On Mon, May 13, 2002 at 08:38:26AM +0200, Stefano Zacchiroli wrote:
> 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 (collected@[head]) 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)

I get it, thanks for the tip.

Denis


-- 
To UNSUBSCRIBE, email to debian-ocaml-maint-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: