The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove useless variable

+12 -12
+1 -1
COPYING
··· 1 1 Ocamlgraph: a generic graph library for ocaml 2 - Copyright (C) 2004-2008 2 + Copyright (C) 2004-2010 3 3 Sylvain Conchon, Jean-Christophe Filli�tre and Julien Signoles 4 4 5 5 This library is free software; you can redistribute it and/or
+11 -11
src/topological.ml
··· 36 36 H.remove degree x; 37 37 Queue.push x todo 38 38 in 39 - let rec walk acc = 39 + let rec walk acc = 40 40 if Queue.is_empty todo then 41 41 (* let's find any node of minimal degree *) 42 42 let min = 43 43 H.fold 44 - (fun v d acc -> 44 + (fun v d acc -> 45 45 match acc with 46 46 | None -> Some (v, d) 47 47 | Some(_, min) -> if d < min then Some (v, d) else acc) ··· 50 50 in 51 51 match min with 52 52 | None -> acc 53 - | Some(v, d) -> push v; walk acc 53 + | Some(v, _) -> push v; walk acc 54 54 else 55 55 let v = Queue.pop todo in 56 56 let acc = f v acc in 57 - G.iter_succ 58 - (fun x-> 59 - try 57 + G.iter_succ 58 + (fun x-> 59 + try 60 60 let d = H.find degree x in 61 61 if d = 1 then push x else H.replace degree x (d-1) 62 - with Not_found -> 62 + with Not_found -> 63 63 (* [x] already visited *) 64 64 ()) 65 - g v; 65 + g v; 66 66 walk acc 67 67 in 68 - G.iter_vertex 69 - (fun v -> 70 - let d = G.in_degree g v in 68 + G.iter_vertex 69 + (fun v -> 70 + let d = G.in_degree g v in 71 71 if d = 0 then Queue.push v todo 72 72 else H.add degree v d) 73 73 g;