+ in + List.iter (iter_lambda dep) list + | Lswitch (l, switch) -> + iter_lambda dep l; + List.iter (fun (_,l) -> iter_lambda dep l) switch.sw_consts; + List.iter (fun (_,l) -> iter_lambda dep l)
Message from Fabrice Le Fessant - 1999-06-19 - Archives of the Caml mailing list
like this: module type ITER = sig type 'a elt type 'a t val iter : ('a elt -> unit) -> 'a t -> unit end module ListIter : ITER = struct type 'a elt = 'a type 'a t = 'a list let iter f l = List.iter f l end type expr =
Message from brogoff@s... - 2003-05-28 - Archives of the Caml mailing list
iter f e = f e; match e with Expr(i, a, b) -> iter f a; iter f b | e -> () end Signature mismatch: Modules do not match: sig type 'a t = 'a expr val iter : ('a expr -> 'b) -> 'a expr -> unit end is not included in Iter Values do not match: val iter : ('a
Message from Warren Harris - 2003-05-28 - Archives of the OCaml beginners mailing list
> let iter f m = > let rec iter = function > Empty -> () > | Node(l, b, r, _) -> > iter l; > f b.key b.data; > List.iter (f b.key) b.prev; > iter r > in iter m.tree;; >
Message from Pierre Weis - 1997-11-19 - Archives of the Caml mailing list
"Array.iter:let:0000", (fun () -> Array.iter i v0) ; 1E5, "Array.iter:fun:0000", (fun () -> Array.iter (fun a -> a) v0) ; 1E4, "array:for:0010", (fun () -> for i = 0 to pred (Array.length v10) do () done) ; 1E4, "Array.iter:let:0010",
Message from Mark Hayden - 1996-07-05 - Archives of the Caml mailing list
type Iter = sig type 'a t val iter : ('a -> unit) -> 'a t -> unit end and here's the list implementation (works great): module ListIter : Iter = struct type 'a t = 'a list let iter f l = List.iter f l end Here's
Message from Warren Harris - 2003-05-28 - Archives of the Caml mailing list
Iter = sig type 'a t val iter : ('a -> unit) -> 'a t -> unit end module ListIter : Iter = struct type 'a t = 'a list let iter f l = List.iter f l end type expr = Expr of expr * expr | Unit module ExprIter : Iter = struct type 'a t = expr let rec iter f e
Message from Warren Harris - 2003-05-27 - Archives of the OCaml beginners mailing list
a Hashtbl.iter on the same hash table? > I don't know if it is legal, but at least it works: > > # let h = Hashtbl.create 8 ;; > > # for i = 0 to pred 8 do > Hashtbl.add h i (char_of_int((int_of_char 'A') + i)) > done ;; > > # Hashtbl.iter (fun i v ->
Message from Till Varoquaux - 2008-05-11 - Archives of the Caml mailing list
doing a Hashtbl.iter on the same hash table? I don't know if it is legal, but at least it works: # let h = Hashtbl.create 8 ;; # for i = 0 to pred 8 do Hashtbl.add h i (char_of_int((int_of_char 'A') + i)) done ;; # Hashtbl.iter (fun i v -> if
Message from Florent Monnier - 2008-05-11 - Archives of the Caml mailing list
(n#iter fn fe : unit) end;; let g = new graph;; g#iter (fun n -> n#draw) (fun e -> e#draw);; let n1 = new node g 1;; g#iter (fun n -> n#draw) (fun e -> e#draw);; (* until now, everything goes fine *) let e11 = new edge g n1 n1;; g#iter (fun n -> n#draw)
Message from Pierre Boulet - 1999-09-09 - Archives of the Caml mailing list