From: Serguei Ouklonski <Sergeiu@optrak.co.uk>
To: caml-list@inria.fr
Subject: Optional arguments
Date: Thu, 8 Feb 2001 12:50:37 -0000 [thread overview]
Message-ID: <30273167BD5AD111A5AD00A0C992201725868D@mercury.optrak.co.uk> (raw)
Hi,
Example1:
let fn1 a:string (?b = "") = (String.length a) + (String.length b)
let x = fn1 "test"
result is function
Example2:
let fn1 (?a = "") b:string = (String.length a) + (String.length b)
let x = fn1 "test"
result is 4 (number)
It seems that in both cases result should be 4.
Have I missed something from OCaml docs?
Regards
Serguei Ouklonski
next reply other threads:[~2001-02-08 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-08 12:50 Serguei Ouklonski [this message]
2001-02-09 1:19 ` Jacques Garrigue
2008-11-09 19:17 malc
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=30273167BD5AD111A5AD00A0C992201725868D@mercury.optrak.co.uk \
--to=sergeiu@optrak.co.uk \
--cc=caml-list@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).