|
From: | Théo Cavignac |
Subject: | Behavior of #!optional |
Date: | Fri, 7 Feb 2020 14:24:42 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 |
Hello everyone,Quick question: is it safe to rely on the fact that positional parameters are available to definition of optional parameters default value ?
In other word, is the following procedure OK or does it rely on implementation detail that may change ?
(define (f a b #!optional (err (lambda () (error "a is not b" (cons a b)))))
(if (eq? a b) #t (err))) Thank you !PS: It's a dumb example but I have a real use case where it would be nice to use that trick.
[Prev in Thread] | Current Thread | [Next in Thread] |