Previous Up Next

5.39.3  Center of a range of values: interval2center

interval2center takes as argument a range of values interval or a list of ranges of values.
interval2center returns the center of this range or the list of centers of these ranges.
Input :

interval2center(3..5)

Output :

4

Input :

interval2center([2..4,4..6,6..10])

Output :

[3,5,8]

Previous Up Next