let rec basic_adjust : (float -> float) -> basic -> basic =
fun oper -> fun b ->
match b with
- |N i -> R (float_of_int i)
- |R f -> R (floor f)
+ |N i -> R (oper (float_of_int i))
+ |R f -> R (oper f)
|Vec vec -> Vec (new vector vec#size
(fun_unary (basic_adjust oper) vec#nth))
- |Zero -> R 0.
+ |Zero -> R (oper 0.)
|Error -> Error;;
let basic_floor = basic_adjust floor;;