1 (* Copyright 2001, 2002 b8_bavard, b8_fee_carabine, INRIA *)
3 This file is part of mldonkey.
5 mldonkey is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 mldonkey is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with mldonkey; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 val removeq
: 'a
-> 'a list
-> 'a list
21 (*d [removeq ele list] returns a copy of [list] where all memory occurences
22 of [ele] have been removed. *)
24 val remove
: 'a
-> 'a list
-> 'a list
25 (*d [remove ele list] returns a copy of [list] where all structural occurences
26 of [ele] have been removed. *)
28 val removeq_first
: 'a
-> 'a list
-> 'a list
29 (*d [removeq_first ele list] returns a copy of [list] where the first memory
30 occurence of [ele] has been removed. *)
32 val remove_first
: 'a
-> 'a list
-> 'a list
33 (*d [remove_first ele list] returns a copy of [list] where the first
34 structural occurence of [ele] has been removed. *)
36 val cut
: int -> 'a list
-> 'a list
* 'a list
38 val tail_map
: ('a
-> 'b
) -> 'a list
-> 'b list
40 val assoc_inv
: 'a
-> ('b
* 'a
) list
-> 'b
42 val safe_iter
: ('a
-> unit) -> 'a list
-> unit
44 val min
: 'a list
-> 'a
45 val max
: 'a list
-> 'a
47 val shuffle
: 'a list
-> 'a list
49 (** [filter_map f l] *)
50 val filter_map
: ('a
-> 'b
option) -> 'a list
-> 'b list
52 (** [iteri f l] call [f] on each element of [l] with the corresponding index, starting from zero *)
53 val iteri
: (int -> 'a
-> unit) -> 'a list
-> unit