[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Keyan Zahedi <ml@p...> |
| Subject: | Re: [Caml-list] Setting function in a class |
hi, this is indeed my code. being sure, that my code is correct, i was able to locate the problem somewhere else :) thanks! keyan On 19 Jul 2010, at 09:37, Stéphane Glondu wrote: > Le 19/07/2010 09:30, Keyan Zahedi a écrit : >> class myclass = >> object >> val mutable _myfunc = (* a function of type string -> bool) >> method set_myfunc f = _myfunc <- f >> method my_func f = _myfunc f >> ;; > > I am not sure of what blocks you. Just making your snippet syntactically > correct works: > > class myclass = > object > val mutable _myfunc = fun (s:string) -> true > method set_myfunc f = _myfunc <- f > method my_func f = _myfunc f > end > ;; > > > Cheers, > > -- > Stéphane >