Version française
Home     About     Download     Resources     Contact us    
Browse thread
Deconstructing optional arguments
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Deconstructing optional arguments

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