From: Chris Hanson Date: Wed, 6 Apr 2016 07:52:05 +0000 (-0700) Subject: Add optional default-value to get-keyword-value. X-Git-Tag: mit-scheme-pucked-9.2.12~261^2~61 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2726d70755b422b214ca4a8067dbb2c19c8e432f;p=mit-scheme.git Add optional default-value to get-keyword-value. --- diff --git a/src/runtime/list.scm b/src/runtime/list.scm index 030d731cd..b2df695c6 100644 --- 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))