File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -368,8 +368,7 @@ struct
368368 (* TODO: move to Set above? *)
369369 let product_widen (op : elt -> elt -> elt option ) a b = (* assumes b to be bigger than a *)
370370 let xs,ys = elements a, elements b in
371- (* TODO: GobList.cartesian_filter_map? *)
372- List. concat_map (fun x -> List. filter_map (fun y -> op x y) ys) xs |> fun x -> join b (of_list x)
371+ GobList. cartesian_filter_map op xs ys |> fun x -> join b (of_list x)
373372 let widen = product_widen (fun x y -> if E. leq x y then Some (E. widen x y) else None )
374373
375374 (* above widen is actually extrapolation operator, so define connector-based widening instead *)
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_filter_map f l1 l2 =
62+ List. concat_map (fun x -> List. filter_map (f x) l2) l1
63+
6164let cartesian_concat_map f l1 l2 =
6265 List. concat_map (fun x -> List. concat_map (f x) l2) l1
6366
You can’t perform that action at this time.
0 commit comments