From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p0L5x4ht028890 for ; Fri, 21 Jan 2011 06:59:04 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtABAPquOE3AbSoIhWdsb2JhbACEE5I0jhwVAQEBCgsKGAQgrXuQMw2BF4M4dAQ X-IronPort-AV: E=Sophos;i="4.60,356,1291590000"; d="scan'208";a="87630202" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 21 Jan 2011 06:58:59 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from first (e178004000.adsl.alicedsl.de [85.178.4.0]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id p0L5wwk1013226 for ; Fri, 21 Jan 2011 06:58:58 +0100 Received: by first (Postfix, from userid 1000) id D9BF5154088D; Fri, 21 Jan 2011 06:58:57 +0100 (CET) Date: Fri, 21 Jan 2011 06:58:57 +0100 From: oliver To: caml-list@yquem.inria.fr Message-ID: <20110121055857.GB10967@siouxsie> References: <4D391C4A.9000608@riken.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4D391C4A.9000608@riken.jp> User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: Re: [Caml-list] writing some code using a function for which only the signature is known Hi, On Fri, Jan 21, 2011 at 02:40:26PM +0900, Francois Berenger wrote: > Hello, > > If I am writing some code, and I don't want to dive > into implementing some sub function I will need but don't > have yet, what is the standard way to do this in ocaml? [...] Maybe it's too late, or it was too much wine ;) but I don't understand waht you are talking about. Can you be more verbose/elaborate or give an example (maybe in Python or Haskell) on what you want to achieve? Your subject also seems not to match the text of your mailbody... ...if you want just to write a function that fit's into a certain signature, it can be a lot or nothing. The signature defines the interface. The functionality that you want to implement can be even more complex, but what gets in and what gets out is in the interface. So: what do you want to know? (Maybe other readers understand you?) Ciao, Oliver P.S.: OK, I just looked up the "pass" command from Python. It seems just to be something that does nothing, but is sytactically needed, so the compiler does not complain. I OCaml, where type checking is a crucial topic, you can insert dummies like giving back unit ( () ) or empty strings( "" ) or so, if you need to do that just to match the type. Or in some cases, option type can help you here. But, as mentioned, a question that is more concrete explaining your problem would be nice. Maybe you just can post some code you tried and did not get running?