On Fri, 2006-09-08 at 00:20 -0400, Peter Tanski wrote: > On this point, I forgot to mention one thing. Haskell type classes > are more powerful than ML modules or OCaml functors because type > classes may be defined over all first-class types, including > functions. For example, the > > class Functor f where > fun :: (a -> b) -> (f a -> f b) > > instance Functor (r->) where > fun f g = f . g >
Not sure I understand. Ocaml functors can accept any type of argument component, including functions: the argument isn't a type, its a module. Higher order functors exist too so I'm told: the only constraint is that functors aren't themselves first class because modules aren't. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Felix-language mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/felix-language
