projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7c2892
)
Add optional default-value to get-keyword-value.
author
Chris Hanson
<org/chris-hanson/cph>
Wed, 6 Apr 2016 07:52:05 +0000
(
00:52
-0700)
committer
Chris Hanson
<org/chris-hanson/cph>
Wed, 6 Apr 2016 07:52:05 +0000
(
00:52
-0700)
src/runtime/list.scm
patch
|
blob
|
history
diff --git
a/src/runtime/list.scm
b/src/runtime/list.scm
index 030d731cd06ba78735a133dad72988241a404b97..b2df695c6678bb69567b3f3a7a755eb386f243e9 100644
(file)
--- a/
src/runtime/list.scm
+++ b/
src/runtime/list.scm
@@
-1378,7
+1378,7
@@
USA.
(define-guarantee unique-keyword-list "unique keyword list")
-(define (get-keyword-value klist key)
+(define (get-keyword-value klist key
#!optional default-value
)
(let ((lose (lambda () (error:not-keyword-list klist 'GET-KEYWORD-VALUE))))
(let loop ((klist klist))
(if (pair? klist)
@@
-1391,7
+1391,7
@@
USA.
(begin
(if (not (null? klist))
(lose))
-
#!default
)))))
+
default-value
)))))
(define (keyword-list->alist klist)
(let loop ((klist klist))