From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 2F06DBC57 for ; Mon, 19 Jul 2010 10:36:12 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhUEAE6rQ0zCX7gsgWdsb2JhbACfbBUBARYiIr8BhSUE X-IronPort-AV: E=Sophos;i="4.55,226,1278280800"; d="scan'208";a="64010914" Received: from mailhost.mis.mpg.de ([194.95.184.44]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Jul 2010 10:36:11 +0200 Received: from twww.mis.mpg.de (twww.mis.mpg.de [194.95.185.34]) by mailhost.mis.mpg.de (8.13.8/8.13.8) with ESMTP id o6J8a82m024771; Mon, 19 Jul 2010 10:36:08 +0200 (MEST) Received: from [172.19.89.136] (pc141-90.mis.mpg.de [141.5.26.90]) (authenticated bits=0) by twww.mis.mpg.de (8.13.8/8.13.8) with ESMTP id o6J8a9tg021528 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 19 Jul 2010 10:36:10 +0200 (MEST) Subject: Re: [Caml-list] Setting function in a class Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=iso-8859-1 From: Keyan Zahedi In-Reply-To: <4C4400B9.9040401@glondu.net> Date: Mon, 19 Jul 2010 10:01:13 +0200 Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: quoted-printable Message-Id: <5765205C-8A2E-447E-9A88-D93C85DF0537@pulsschlag.net> References: <892ABE41-F325-4BC2-9C7B-C5B9DE63AC0B@pulsschlag.net> <4C4400B9.9040401@glondu.net> To: =?iso-8859-1?Q?St=E9phane_Glondu?= X-Mailer: Apple Mail (2.1081) X-MIS-Check-Sender: OK, relay allowed from this IP.OK, user zahedi() has authenticated himself with PLAIN. X-Spam: no; 0.00; val:01 mutable:01 bool:01 val:01 mutable:01 cheers:01 wrote:01 caml-list:01 func:01 func:01 string:02 string:02 jul:05 problem:05 somewhere:06 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=E9phane Glondu wrote: > Le 19/07/2010 09:30, Keyan Zahedi a =E9crit : >> class myclass =3D >> object >> val mutable _myfunc =3D (* a function of type string -> bool) >> method set_myfunc f =3D _myfunc <- f >> method my_func f =3D _myfunc f >> ;; >=20 > I am not sure of what blocks you. Just making your snippet = syntactically > correct works: >=20 > class myclass =3D > object > val mutable _myfunc =3D fun (s:string) -> true > method set_myfunc f =3D _myfunc <- f > method my_func f =3D _myfunc f > end > ;; >=20 >=20 > Cheers, >=20 > --=20 > St=E9phane >=20