FWIW, reasons like this is why most of the standard libraries have #f or some other simple value for a default. Then, the &quot;real&quot; default is computed in the body. <br><br>Robby<br><br>On Saturday, February 11, 2012, Laurent &lt;<a href="mailto:laurent.orseau@gmail.com">laurent.orseau@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>&gt; Often I&#39;d like to make a wrapper for a given function that has default values (possibly with keywords).<br>&gt; So if I want my function to have the same default values for one particular optional argument, I need to redefine it myself.<br>
&gt; For example, suppose there already exists a function foo like this:<br>&gt; (define (foo arg1 [arg2 &lt;some-complicated-default-value&gt;])<br>&gt;   ....)<br>&gt; And I want to make a wrapper for foo on arg1, but keep foo&#39;s arg2 default value:<br>
&gt; (define (bar [arg2 &lt;the-same-complicated-default-value&gt;])<br>&gt;   (foo 5 arg2))<br>&gt; But I don&#39;t feel right when I need to redefine the default argument, for a few reasons:<br>&gt; - I feel bar should not need to know foo&#39;s arg2 default value.<br>
&gt; - if arg2 has a complicated default argument, it is &quot;painful&quot; and error-prone to rewrite it (and if the docs for the default value for arg2 are simplified, it may be problematic),<br>&gt; - if the specification of foo&#39;s arg2 changes, I need to change bar too (though sometimes bar&#39;s arg2 needs not reflect the change, but often it does),<br>
&gt; I would prefer something like:<br>&gt; (define (bar [arg2 (get-default-value foo arg2)])<br>&gt;   (foo 5 arg2))<br>&gt; which is transparent w.r.t. foo.<br>&gt; Does this feature exist, or does it even have a name? Or can it be easily implemented (maybe keywords could help)?<br>
&gt; Thanks,<br>&gt; Laurent