From: "Stéphane Glondu" <steph@glondu.net>
To: Keyan Zahedi <ml@pulsschlag.net>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Setting function in a class
Date: Mon, 19 Jul 2010 09:37:29 +0200 [thread overview]
Message-ID: <4C4400B9.9040401@glondu.net> (raw)
In-Reply-To: <892ABE41-F325-4BC2-9C7B-C5B9DE63AC0B@pulsschlag.net>
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
next prev parent reply other threads:[~2010-07-19 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-19 7:30 Keyan Zahedi
2010-07-19 7:37 ` Stéphane Glondu [this message]
2010-07-19 8:01 ` [Caml-list] " Keyan Zahedi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C4400B9.9040401@glondu.net \
--to=steph@glondu.net \
--cc=caml-list@yquem.inria.fr \
--cc=ml@pulsschlag.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox