From 32122cbae7a33584dd3a11b131b73ea30f310a15 Mon Sep 17 00:00:00 2001 From: engboris Date: Wed, 20 Apr 2022 11:43:54 +0200 Subject: [PATCH] Small fix --- ocaml/Circuits.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ocaml/Circuits.ml b/ocaml/Circuits.ml index 64df7dd..6cf52db 100644 --- a/ocaml/Circuits.ml +++ b/ocaml/Circuits.ml @@ -28,10 +28,11 @@ let get_inputs circ node = let get_op circ node = let (_, op) = get_node_info circ node in op +(* extracts the two first inputs in a list of inputs *) let extract_bin_ins = function | [] -> failwith "Error extract_bin_ins: no input." | h1::h2::t -> (h1, h2) - | _ -> failwith "Error extract_bin_ins: inputs does not match." + | _ -> failwith "Error extract_bin_ins: inputs do not match." (* _________ Evaluation _________ *) @@ -60,8 +61,8 @@ let rec value circ concl = let rec eval (circ : circuit) : int = let (_, _, concl) = - List.hd (List.filter (fun (_, o, _) -> o = COut) circ) in - value circ concl + List.hd (List.filter (fun (_, o, _) -> o = COut) circ) + in value circ concl (* _________ Examples _________ *)