mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-11 07:48:32 -04:00
more explicit type declaration
This commit is contained in:
parent
b5fb3f0ff0
commit
9ca1f76bd7
2 changed files with 6 additions and 1 deletions
|
|
@ -81,6 +81,11 @@ let fold_right f l acc =
|
||||||
List.fold_left (+) 0 (1 -- 1_000_000)
|
List.fold_left (+) 0 (1 -- 1_000_000)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
(*$Q
|
||||||
|
(Q.list Q.small_int) (fun l -> \
|
||||||
|
l = fold_right (fun x y->x::y) l [])
|
||||||
|
*)
|
||||||
|
|
||||||
let rec compare f l1 l2 = match l1, l2 with
|
let rec compare f l1 l2 = match l1, l2 with
|
||||||
| [], [] -> 0
|
| [], [] -> 0
|
||||||
| _, [] -> 1
|
| _, [] -> 1
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
This module defines state machines that should help design applications
|
This module defines state machines that should help design applications
|
||||||
with a more explicit control of state (e.g. for networking applications). *)
|
with a more explicit control of state (e.g. for networking applications). *)
|
||||||
|
|
||||||
type ('a, 's, 'b) t = 's -> 'a -> ('b * 's) option
|
type ('input, 'state, 'output) t = 'state -> 'input -> ('output * 'state) option
|
||||||
(** transition function that fully describes an automaton. It returns
|
(** transition function that fully describes an automaton. It returns
|
||||||
[None] to indicate that it stops. *)
|
[None] to indicate that it stops. *)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue