Alpha: more intuitive Misc.(-->)

This commit is contained in:
Grégoire Henry 2018-02-23 13:43:29 -05:00 committed by Benjamin Canou
parent e42cd1ccd6
commit 672109de54
3 changed files with 6 additions and 6 deletions

View File

@ -169,7 +169,7 @@ let check_endorsements_rights c level slots =
return delegate
let paying_priorities c =
0 --> Constants.first_free_baking_slot c
0 --> (Constants.first_free_baking_slot c - 1)
let bond_and_reward =
match Tez.(Constants.baking_bond_cost +? Constants.baking_reward) with

View File

@ -11,13 +11,13 @@ type 'a lazyt = unit -> 'a
type 'a lazy_list_t = LCons of 'a * ('a lazy_list_t tzresult Lwt.t lazyt)
type 'a lazy_list = 'a lazy_list_t tzresult Lwt.t
let rec (-->) i j = (* [i; i+1; ...; j-1] *)
if Compare.Int.(i >= j)
let rec (-->) i j = (* [i; i+1; ...; j] *)
if Compare.Int.(i > j)
then []
else i :: (succ i --> j)
let rec (--->) i j = (* [i; i+1; ...; j-1] *)
if Compare.Int32.(i >= j)
let rec (--->) i j = (* [i; i+1; ...; j] *)
if Compare.Int32.(i > j)
then []
else i :: (Int32.succ i ---> j)

View File

@ -13,7 +13,7 @@ type 'a lazyt = unit -> 'a
type 'a lazy_list_t = LCons of 'a * ('a lazy_list_t tzresult Lwt.t lazyt)
type 'a lazy_list = 'a lazy_list_t tzresult Lwt.t
(** Include lower bound, exclude upper bound *)
(** Include bounds *)
val (-->) : int -> int -> int list
val (--->) : Int32.t -> Int32.t -> Int32.t list