Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Deconstructing optional arguments
@ 2008-04-11  9:24 Jon Harrop
  2008-04-11 10:06 ` [Caml-list] " Alain Frisch
  2008-04-11 10:36 ` Olivier Andrieu
  0 siblings, 2 replies; 3+ messages in thread
From: Jon Harrop @ 2008-04-11  9:24 UTC (permalink / raw)
  To: caml-list


Is it possible to deconstruct an optional argument as you can with a labeled 
argument:

  let f ~p:(x,y) () = x - y

with something like:

  let f ?(p=0,0):(x,y) () = x - y

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-11 10:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-11  9:24 Deconstructing optional arguments Jon Harrop
2008-04-11 10:06 ` [Caml-list] " Alain Frisch
2008-04-11 10:36 ` Olivier Andrieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox