TamarinUtilsImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Mark Ross November 10, 1986 6:01:49 pm PST
Last Edited by: Ross November 11, 1986 2:47:13 pm PST
DIRECTORY TamarinUtils;
TamarinUtilsImpl: CEDAR PROGRAM
IMPORTS
EXPORTS TamarinUtils =
BEGIN
Fibonacci: PUBLIC PROC [inNum: NAT] RETURNS [fibNum: INT] = {
SELECT inNum FROM
0 => RETURN[1];
1 => RETURN[1];
2 => RETURN[1];
ENDCASE => RETURN[Fibonacci[inNum-1] + Fibonacci[inNum-2]];
};
END.