This commit is contained in:
Simon Cruanes 2014-11-16 23:54:37 +01:00
parent ac0f18d3c7
commit 0da13496a4
2 changed files with 5 additions and 5 deletions

View file

@ -128,7 +128,7 @@ and _sequence_map : type a b. (a -> b t) -> a list -> b list -> b list
| a::tail -> | a::tail ->
let x = _run (f a) in let x = _run (f a) in
_sequence_map f tail (x::acc) _sequence_map f tail (x::acc)
let _printers = let _printers =
ref [ ref [
(* default printer *) (* default printer *)

View file

@ -112,9 +112,9 @@ val fail : string -> 'a t
(** {2 Finalizers} *) (** {2 Finalizers} *)
val (>>>=) : 'a with_finalizer -> ('a -> 'b t) -> 'b t val (>>>=) : 'a with_finalizer -> ('a -> 'b t) -> 'b t
(** Alternative to {!(>>=)} that also takes a [unit t] value, that is a (** Same as {!(>>=)}, but taking the finalizer into account. Once this
finalizer. This action will run in any case (even failure). IO value is done executing, the finalizer is executed and the resource,
Other than the finalizer, this behaves like {!(>>=)} *) fred. *)
(** {2 Running} *) (** {2 Running} *)
@ -281,7 +281,7 @@ How to list recursively files in a directory:
File.read_dir ~recurse:true (File.make "/tmp") File.read_dir ~recurse:true (File.make "/tmp")
>>= Seq.output ~sep:"\n" stdout >>= Seq.output ~sep:"\n" stdout
) |> CCIO.run_exn ;; ) |> CCIO.run_exn ;;
]} ]}
See {!File.walk} if you also need to list directories. See {!File.walk} if you also need to list directories.