![]() | ![]() | ![]() | Exercise 4 - Lists of closed intervals whose bounds are integers | Documentation and user's manual | Table of contents | OCaml programs |
closed_interval
provided by the Closed_interval
module.
To deal with lists use the functions provided by the List_1
module.
Use lists of closed interval whose bounds are integers. For each of the following specifications of functional values write a recursive definition that meets the specification: |
|
Name: map_width .
Type: closed_interval list -> int list .
Computes the list of the widths of the elements in a list of intervals.
|
|
Name: are_embedded .
Type: closed_interval list -> bool .
Tests whether a list of intervals is in increasing order (according to set inclusion).
|
![]() | ![]() | ![]() | Exercise 4 - Lists of closed intervals whose bounds are integers | Documentation and user's manual | Table of contents | OCaml programs |