caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: oliver <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] writing some code using a function for which only the signature is known
Date: Fri, 21 Jan 2011 06:58:57 +0100	[thread overview]
Message-ID: <20110121055857.GB10967@siouxsie> (raw)
In-Reply-To: <4D391C4A.9000608@riken.jp>

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?

  reply	other threads:[~2011-01-21  5:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21  5:40 Francois Berenger
2011-01-21  5:58 ` oliver [this message]
     [not found] ` <AANLkTikv07AgCJXKD_e_QvGGz5245svFGiTG85fpZC7P@mail.gmail.com>
2011-01-21  6:12   ` dmitry grebeniuk
2011-01-21 15:32     ` oliver
2011-01-21 18:26       ` dmitry grebeniuk
2011-01-21 10:56 ` Arlen Cuss
2011-01-21 13:49 mark
2011-01-21 15:20 ` Daniel Bünzli

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=20110121055857.GB10967@siouxsie \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@yquem.inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).