If you are doing a calculation multiple times but only need to make a change to one of its variables, you can do this as a function. An example of a use of this and how it can be converted in to a function
let circumference radius = 2.0 *. 3.14159265359 *. radius;; circumference 10.0;;
The above function is called circumference and accepts a parameter of radius. You can see how this is called by the second line.
Screen Shot 2014-11-02 at 20.56.21.png 43.08KB 0 downloads