Another function type example
fun quad(a,b,c) = let b_sqr = b*b sq_4_a_c = sqrt(4.0*a*c) two_a = 2.0*a in ((b_sqr + sq_4_a_c)/two_a), (b_sqr – sq_4_a_c)/two_a))end;
val : quad = fn real*real*real -> real*real
Previous slide
Next slide
Back to first slide
View graphic version