Exercise 1.1: The Circle
Given: a real value, r, for the radius of a circle;
Compose: a let-in statement that returns the area and circumference of a circle of the given radius.
area, circumference :=
let pi := 3.14159
in pi * r * r,
2.0 * pi * r
end let
Previous Section
If you have any questions about this page, or want more information about the
Sisal Language Project, contact:
John Feo at (510) 422-6389 or feo@diego.llnl.gov, or
Tom DeBoni at (510) 423-3793 or deboni@llnl.gov.
The Sisal Language Project has been approved as a Designated Unclassified Subject Area (DUSA) K19222, as of 07 August, 1991.
LLNL Disclaimer
UCRL-MI-122601