mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 04:00:26 +02:00
* boot-9.scm: values?, get-values, values, call-with-values:
removed. values and call-with-values are now primitives and the other two were only exported by accident. don't define *values-rtd* record type or handle multiple values in scm-style-repl.
This commit is contained in:
parent
ce21243418
commit
3923fa6d06
2 changed files with 9 additions and 33 deletions
|
@ -1,3 +1,11 @@
|
|||
2000-11-26 Gary Houston <ghouston@arglist.com>
|
||||
|
||||
* boot-9.scm: values?, get-values, values, call-with-values:
|
||||
removed. values and call-with-values are now primitives and
|
||||
the other two were only exported by accident. don't define
|
||||
*values-rtd* record type or handle multiple values in
|
||||
scm-style-repl.
|
||||
|
||||
2000-11-07 Gary Houston <ghouston@arglist.com>
|
||||
|
||||
* popen.scm (open-output-pipe): added docstrings for open-input-pipe
|
||||
|
|
|
@ -510,36 +510,6 @@
|
|||
answer
|
||||
(loop (cons init answer) (- n 1)))))
|
||||
|
||||
|
||||
|
||||
;;; {Multiple return values}
|
||||
|
||||
(define *values-rtd*
|
||||
(make-record-type "values"
|
||||
'(values)))
|
||||
|
||||
;;; These two are needed internally in boot-9.scm.
|
||||
;;; They shouldn't be visible outside this module.
|
||||
(define values? (record-predicate *values-rtd*))
|
||||
(define get-values (record-accessor *values-rtd* 'values))
|
||||
|
||||
(define values
|
||||
(let ((make-values (record-constructor *values-rtd*)))
|
||||
(lambda x
|
||||
(if (and (not (null? x))
|
||||
(null? (cdr x)))
|
||||
(car x)
|
||||
(make-values x)))))
|
||||
|
||||
(define call-with-values
|
||||
(lambda (producer consumer)
|
||||
(let ((result (producer)))
|
||||
(if (values? result)
|
||||
(apply consumer (get-values result))
|
||||
(consumer result)))))
|
||||
|
||||
(provide 'values)
|
||||
|
||||
|
||||
;;; {and-map and or-map}
|
||||
;;;
|
||||
|
@ -2591,9 +2561,7 @@
|
|||
(lambda (result)
|
||||
(if (not scm-repl-silent)
|
||||
(begin
|
||||
(if (values? result)
|
||||
(for-each maybe-print (get-values result))
|
||||
(maybe-print result))
|
||||
(maybe-print result)
|
||||
(if scm-repl-verbose
|
||||
(repl-report))
|
||||
(force-output))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue