Continued fraction/Arithmetic/Construct from rational number: Difference between revisions
Content added Content deleted
Line 654: | Line 654: | ||
are represented as any one of the signed integer types for which |
are represented as any one of the signed integer types for which |
||
there is a typekind. *) |
there is a typekind. *) |
||
(* Notice that we do not use the ‘lazy evaluation’ features of ATS2. |
|||
I had considered using lazy streams, but they proved unsuitable. |
|||
What I do, instead, is force "cf" objects to be stored in mutable |
|||
locations. The object stored at the location changes as we memoize |
|||
terms. *) |
|||
abstype cf (tk : tkind) = ptr |
abstype cf (tk : tkind) = ptr |