export get_first from underlying table;
authorwenzelm
Tue, 09 Sep 2008 20:22:30 +0200
changeset 28183 7d5103454520
parent 28182 bfd7a8700676
child 28184 5ed5cb73a2e9
export get_first from underlying table;
src/Pure/General/graph.ML
--- a/src/Pure/General/graph.ML	Tue Sep 09 19:57:54 2008 +0200
+++ b/src/Pure/General/graph.ML	Tue Sep 09 20:22:30 2008 +0200
@@ -15,6 +15,7 @@
   val empty: 'a T
   val keys: 'a T -> key list
   val dest: 'a T -> (key * key list) list
+  val get_first: (key * ('a * (key list * key list)) -> 'b option) -> 'a T -> 'b option
   val fold: (key * ('a * (key list * key list)) -> 'b -> 'b) -> 'a T -> 'b -> 'b
   val minimals: 'a T -> key list
   val maximals: 'a T -> key list
@@ -85,6 +86,7 @@
 fun keys (Graph tab) = Table.keys tab;
 fun dest (Graph tab) = map (fn (x, (_, (_, succs))) => (x, succs)) (Table.dest tab);
 
+fun get_first f (Graph tab) = Table.get_first f tab;
 fun fold_graph f (Graph tab) = Table.fold f tab;
 
 fun minimals G = fold_graph (fn (m, (_, ([], _))) => cons m | _ => I) G [];