mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-01-24 18:16:40 -05:00
add test
This commit is contained in:
parent
a722c0c9b8
commit
4cfb82a3fe
1 changed files with 6 additions and 0 deletions
|
|
@ -818,6 +818,12 @@ let range_by ~step i j =
|
|||
range_by ~step:max_int 0 2 = [0]
|
||||
*)
|
||||
|
||||
(*$Q
|
||||
Q.(pair small_int small_int) (fun (i,j) -> \
|
||||
let i = min i j and j = max i j in \
|
||||
range_by ~step:1 i j = range i j)
|
||||
*)
|
||||
|
||||
let range i j =
|
||||
let rec up i j acc =
|
||||
if i=j then i::acc else up i (j-1) (j::acc)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue