Skip to content

ex1 1

← Back

Basic Info

Functional Programming
└── Lab ML
    └── 0​321
        └── ex1 1.sml

Preview

(*Write a short program to compute x^1000*)

fun thousandthPower(x:real) =
    let
        val x = x*x*x*x*x;
        val x = x*x*x*x*x;
        val x = x*x*x*x*x;
    in
        x*x*x*x*x*x*x*x
    end
;