From 2e49ebb3b1d297e79e8415e7a9bce7d866817f98 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Tue, 20 Oct 2015 14:27:20 +0100 Subject: Fixing bugs in pretty printer to ocaml --- src/util.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/util.ml') diff --git a/src/util.ml b/src/util.ml index 0ae3fcf7..a2bd7cc0 100644 --- a/src/util.ml +++ b/src/util.ml @@ -80,6 +80,11 @@ let remove_dups compare eq l = in aux [] l' +let rec power i tothe = + if tothe <= 0 + then 1 + else i * power i (tothe - 1) + let rec assoc_maybe eq l k = match l with | [] -> None -- cgit v1.2.3