The module util/integer contains min and max functions:
/** given a set of integers, return the largest element */
fun max [es: set Int]: lone Int { es - es.^prev }
/** given a set of integers, return the smallest element */
fun min [es: set Int]: lone Int { es - es.^next }
The module
util/integer
contains min and max functions: