Hello, On Sat, Feb 11, 2012 at 14:55, Laurent <laurent.ors...@gmail.com> wrote:
> ... > > (define (bar [arg2 (get-default-value foo arg2)]) > (foo 5 arg2)) > > > Maybe someone will have a better idea (or a brighter implementation), but if not, here's my contribution: #lang racket (require rackunit) (define (foo arg1 [arg2 10]) (+ arg1 arg2)) (define (bar [arg2 #f]) (let ([arg1 5]) (cond [arg2 (foo arg1 arg2)] [else (foo arg1)]))) (check-= (bar 2) 7 0) (check-= (bar) 15 0) ;;;;;;;;;;;;; I think what Robby wrote seconds ago is compatible with that... []'s Rodolfo
____________________ Racket Users list: http://lists.racket-lang.org/users