The examples of functors I can find in CTM, as well as the ones that I
looked up in the documentation, use files to compile the file separately
and then do an import. I can see where that would be the normal way to
go about doing things for modularity purposes. But for my current
purposes, I'd like to do something like:
Rational =
functor
export
makeRat : MakeRat
define
fun {MakeRat N D} [N D] end
end
OneHalf = {Rational.makeRat 1 2}
The functor compiles, but I get an error when trying to use the functor
on the last statement.
Am I missing something obvious?
Thanks,
Chris Rathman
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users