English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-01 (00:11)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: Re: [Caml-list] Stdlib
> Because the technology to do that is WAY in advance of the
> current Ocaml.
> What you are asking for is *polyadic* functions, aka
> functorial polymorphism. For example, a fold function
> that works on all data structures, that is, polymorphic
> not just on the data type (such as int),
> but also the data functor (such as list).
> Such a function would never work with abstracted modules,
> it would require data types to be defined entirely algebraically.
> All of this can be done (I worked on a system that did it),
> however it is definitely non-trivial. It is well in advance
> of anything Haskell can do also.

Really? What about type classes? Haskell has fmap! That's an example
of what you mean, correct?