Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Polymorphic method problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: William Lovas <wlovas@s...>
Subject: Re: [Caml-list] Polymorphic method problem
On Wed, Jul 07, 2004 at 12:00:04AM +0200, Christian Szegedy wrote:
> Dear Alex!
> 
> I tried to run your code, but it has obvious syntax errors.

I suspect a copy/paste error.  Here's the corrected code:

    class a =
    object (self)
      method f : 'a.((<f:unit; ..> as 'a) -> unit) =
          fun x -> x # f
      method g = self
    end

Hope this helps.

cheers,
William

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners