File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 153153 (define* (partial fun #:rest args)
154154 (lambda x (apply fun (append args x))))
155155
156- (define* (fun x y #:key kw (kw-opt1 'o1 ) (kw-opt2 'o2 ) #:rest args)
157- "kw-opt1, kw-opt2 are keywords and optional arguments at the same time "
156+ (define* (fun x y #:key kw (kw-opt1 'o1 ) (kw-opt2 'o2 ) #:allow-other-keys #: rest args)
157+ "kw-opt1, kw-opt2 are keywords and optional arguments at the same time. "
158158 (list x y kw kw-opt1 kw-opt2 args))
159- (fun 'x #:kw '42 'args ) ;; (x #:kw #f o1 o2 (42 args))
160- (apply fun (list 'x #:kw '42 'args )) ;; (x #:kw #f o1 o2 (42 args))
161- (fun 'x 'y #:kw '42 #:kw-opt1 'ox #:kw-opt2 'oy 'args )
162- ;; (x y 42 ox oy (#:kw 42 #:kw-opt1 ox #:kw-opt2 oy args))
159+ (fun 'x #:kw '42 #:other-kw 0 'args ) ;; (x #:kw #f o1 o2 (42 #:other-kw 0 args))
160+ (apply fun (list 'x #:kw '42 #:other-kw 0 'args )) ;; (x #:kw #f o1 o2 (42 #:other-kw 0 args))
161+ (fun 'x 'y #:kw '42 #:kw-opt1 'ox #:kw-opt2 'oy #:other-kw 0 'args )
162+ ;; (x y 42 ox oy (#:kw 42 #:kw-opt1 ox #:kw-opt2 oy #:other-kw 0 args))
163163
164164 (define* (fun x #:optional (y 'y-default-val ) z) (list x y z))
165165 (fun 1 ) ;; (1 y-default-val #f)
You can’t perform that action at this time.
0 commit comments