|
variadic arity
Alex Shinn
(17 Jun 2020 00:50 UTC)
|
|
Re: variadic arity
Alex Shinn
(17 Jun 2020 01:00 UTC)
|
|
Re: variadic arity
Alex Shinn
(17 Jun 2020 22:18 UTC)
|
|
Re: variadic arity
Arthur A. Gleckler
(17 Jun 2020 22:23 UTC)
|
|
Re: variadic arity
Marc Nieper-Wißkirchen
(18 Jun 2020 08:04 UTC)
|
|
Re: variadic arity
Alex Shinn
(18 Jun 2020 09:34 UTC)
|
|
Re: variadic arity
Marc Nieper-Wißkirchen
(18 Jun 2020 09:56 UTC)
|
|
Re: variadic arity Marc Nieper-Wißkirchen (18 Jun 2020 11:47 UTC)
|
|
Re: variadic arity
Alex Shinn
(18 Jun 2020 13:22 UTC)
|
|
Re: variadic arity
Marc Nieper-Wißkirchen
(18 Jun 2020 16:39 UTC)
|
Am Do., 18. Juni 2020 um 11:55 Uhr schrieb Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de>: > >> I am not sure about the usefulness of the example, though. We have > >> already case-lambda for an optimized version (given that the > >> underlying Scheme has case-lambda as a core form): > >> > >> (define (complement fn) > >> (case-lambda > >> (() (not (fn))) > >> ((x) (not (fn x))) > >> ((x y) (not (fn x y))) > >> (x* (not (apply fn x*))))) > > > > > > Not all Schemes have case-lambda as a core form, and we should > > not be in the business of discouraging axiomatic Scheme. In the > > absense of special support for this, your definition is slower than > > no optimization at all. Addendum: In the case, FN is a variadic procedure like `+` and given a decent case-lambda implementation, my definition is actually an optimization while Shiro's original example code isn't. The original example code also does not take into account that the arity of FN can change (which it can if the arity is defined through some dynamic property as SRFI 191 currently tries to do).