Legend:
Library
Module
Module type
Parameter
Class
Class type
Unions of ranges of integers
Example
We define two sets, s=[0..5; 10..20] and r=[4..15], and we compute their union and intersection.
open Bogue.Selection;;
# let s = of_list [(0,5); (10,20)];;
val s : t = <abstr>
# sprint s;;
- : string = "{0..5, 10..20}"
# let r = of_list [(4,15)];;
val r : t = <abstr>
# sprint (union s r);;
- : string = "{0..20}"
# sprint (intersect s r);;
- : string = "{4..5, 10..15}"