Skip to content

Latest commit

 

History

History

minfun

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Minimum of a function

Recall the built-in option type:

type 'a option = Some of 'a | None

Write a function with the following type:

val minfun : (int -> 'a) -> int -> int -> 'a option = <fun>

such that minfun f a b computes the minimum of f in the range [a,b]. If the range is empty, then the function evaluates to None.