diff options
| author | Alasdair Armstrong | 2018-02-13 19:18:34 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-02-13 20:47:53 +0000 |
| commit | f10a3973ec9e4f26fa78eb479fbeacc6caa0dcbf (patch) | |
| tree | 9e8ddc4b42365f00469fd9e2261c9b79958d11f8 /src/util.ml | |
| parent | ee7ee68027547631e9b264c0c2f258f24407792a (diff) | |
Support for large bitvector literals in C backend
Diffstat (limited to 'src/util.ml')
| -rw-r--r-- | src/util.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util.ml b/src/util.ml index 94caf9fc..a627fd58 100644 --- a/src/util.ml +++ b/src/util.ml @@ -387,7 +387,12 @@ let is_none opt = not (is_some opt) let rec take n xs = match n, xs with | 0, _ -> [] | n, [] -> [] - | n, (x :: xs) -> x :: take (n - 1) xs + | n, (x :: xs) -> x :: take (n - 1) xs + +let rec drop n xs = match n, xs with + | 0, xs -> xs + | n, [] -> [] + | n, (x :: xs) -> drop (n - 1) xs let termcode n = if !opt_colors then |
