Version française
Home     About     Download     Resources     Contact us    
Browse thread
Stdlib
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
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?

Jonathan