Skip to content

Commit 5b5fa4a

Browse files
committed
notes
1 parent ea981a3 commit 5b5fa4a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

notes/guix-guile-nix/guile.scrbl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@
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)

0 commit comments

Comments
 (0)