On Thu, 28 Dec 2006 23:29:10 +0100, Max Wolf wrote: > Its probably because i dont understand SML in general, but i wonder why > this works. > I would assume, that the compiler would reject this. > MkHashImpMap is a functor, but its imported as a structure. > I tried: > import *functor* MkHashImpMap from "x-alice:/lib/data/MkHashImpMap" > in the toplevel and it seems to be the same to me. > > Is a functor a kind of a structure?
Yes (in Alice ML). In fact, functor F (X : S) = ... is short for structure F = fct X : S => ... just like fun f x = ... is syntactic sugar for val rec f = fn x => ... See: http://ps.uni-sb.de/alice/manual/modules.html#higher Best regards, Georg _______________________________________________ alice-users mailing list [email protected] http://www.ps.uni-sb.de/mailman/listinfo/alice-users
