diff options
| author | Kathy Gray | 2015-10-20 14:27:20 +0100 |
|---|---|---|
| committer | Kathy Gray | 2015-10-20 14:27:30 +0100 |
| commit | 2e49ebb3b1d297e79e8415e7a9bce7d866817f98 (patch) | |
| tree | 41c93ecf7b92c85fbe0d3d26c567dc64f0125e93 /src/util.ml | |
| parent | 602adb432b158efa403959454328bc58bddca61b (diff) | |
Fixing bugs in pretty printer to ocaml
Diffstat (limited to 'src/util.ml')
| -rw-r--r-- | src/util.ml | 5 |
1 files changed, 5 insertions, 0 deletions
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 |
