Example
- fun signum(x) =
if x > 0 then positive
else if x = 0 then Zero
else Negative;
val signum = fn : int -> sign;
- fun signum_val(Positive) = 1
| signum_val(Zero) = 0
| signum_val(Negative) = -1;
val signum = fn : sign -> int;
Previous slide
Next slide
Back to first slide
View graphic version