diff options
| author | Christopher Pulte | 2015-10-20 14:28:45 +0100 |
|---|---|---|
| committer | Christopher Pulte | 2015-10-20 14:28:45 +0100 |
| commit | 68034d3ab0210076395e86dc39a4d2c3f1938868 (patch) | |
| tree | 2332da641ae9495e518433531d0345d59ece1c4b /src/util.ml | |
| parent | 117e58ac3da5d79dab16988b693cdd0908c0bb48 (diff) | |
| parent | 2e49ebb3b1d297e79e8415e7a9bce7d866817f98 (diff) | |
Merge branch 'master' of https://bitbucket.org/Peter_Sewell/l2
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 |
