Skip to content
Newer
Older
100644 54 lines (40 sloc) 1.51 KB
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
18
19 (**
20 Output signature of functors.
21 Taking an aggregate of 'a element (lists, set, map..) to give an iterator.
22 *)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
23 module type S =
24 sig
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
25
26 (** The type of the aggregate of elements of type 'a*)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
27 type +'a structure
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
28
29 (** The type of the elements of the aggregate*)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
30 type +'a element
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
31
32 (** The type of the iterator*)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
33 type 'a t
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
34
35 (** Create an iterator for the structure*)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
36 val make : 'a structure -> 'a t
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
37
38 (** Taking an element of the iterator
39 @raise IteratorEnd if there are no more elements*)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
40 val get : 'a t -> 'a element
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
41
42 (** The iterator, one step further
43 @raise IteratorEnd if there are no more elements*)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
44 val next : 'a t -> 'a t
45 (* val prev : 'a t -> 'a t *)
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
46
47 (** True if this iterator has no more element
48 (get and next would raise IteartorEnd) *)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
49 val at_end : 'a t -> bool
5b18026 [enhance] Stdlib: Comments in Standard Library
Arthur Milchior authored Jun 28, 2011
50
51 (** The number of remaining elements *)
fccc685 Initial open-source release
MLstate authored Jun 21, 2011
52 val remaining : 'a t -> int
53 end
Something went wrong with that request. Please try again.