File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
cdomain/value/cdomains/int Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ struct
114114 let binop (x : t ) (y : t ) op : t = match x, y with
115115 | [] , _ -> []
116116 | _ , [] -> []
117- | _ , _ -> canonize @@ List. concat_map op ( BatList. cartesian_product x y)
117+ | _ , _ -> canonize @@ GobList. cartesian_concat_map ( Batteries. curry op) x y
118118
119119
120120 include Std (struct type nonrec t = t let name = name let top_of = top_of let bot_of = bot_of let show = show let equal = equal end )
@@ -190,7 +190,7 @@ struct
190190 let binary_op_concat_with_norm op (ik :ikind ) (x : t ) (y : t ) : t*overflow_info = match x, y with
191191 | [] , _ -> ([] ,{overflow= false ; underflow= false })
192192 | _ , [] -> ([] ,{overflow= false ; underflow= false })
193- | _ , _ -> norm_intvs ik @@ List. concat_map ( fun ( x , y ) -> op x y) ( BatList. cartesian_product x y) (* TODO: GobList.cartesian_concat_map? *)
193+ | _ , _ -> norm_intvs ik @@ GobList. cartesian_concat_map op x y
194194
195195 let binary_op_with_ovc (x : t ) (y : t ) op : t*overflow_info = match x, y with
196196 | [] , _ -> ([] ,{overflow= false ; underflow= false })
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ let until_last_with (pred: 'a -> bool) (xs: 'a list) =
5858let cartesian_map f l1 l2 =
5959 List. concat_map (fun x -> List. map (f x) l2) l1
6060
61+ let cartesian_concat_map f l1 l2 =
62+ List. concat_map (fun x -> List. concat_map (f x) l2) l1
63+
6164
6265(* * Open this to use applicative functor/monad syntax for {!list}. *)
6366module Syntax =
You can’t perform that action at this time.
0 commit comments