mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 11:10:21 +02:00
Revert "SRFI-45: Support multiple values; add promise? predicate."
This reverts commit 1d64b4edb9
.
This commit is contained in:
parent
59b0f9d763
commit
65ad02b96d
3 changed files with 32 additions and 89 deletions
|
@ -1,7 +1,6 @@
|
|||
;;; -*- mode: scheme; coding: utf-8; -*-
|
||||
|
||||
;; Copyright (C) 2010, 2013 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2003 André van Tonder. All Rights Reserved.
|
||||
;; Copyright André van Tonder. All Rights Reserved.
|
||||
;;
|
||||
;; Permission is hereby granted, free of charge, to any person
|
||||
;; obtaining a copy of this software and associated documentation
|
||||
|
@ -259,43 +258,3 @@
|
|||
;; Commented out since it takes too long
|
||||
#;
|
||||
(test-equal 300000000 (force (times3 100000000))) ;==> bounded space
|
||||
|
||||
|
||||
;======================================================================
|
||||
; Test promise? predicate (non-standard Guile extension)
|
||||
|
||||
(pass-if "promise? predicate"
|
||||
(promise? (delay 1)))
|
||||
|
||||
;======================================================================
|
||||
; Test memoization of multiple values (non-standard Guile extension)
|
||||
|
||||
(with-test-prefix "Multiple values (non-standard)"
|
||||
|
||||
(let ((promise (delay (values 1 2 3))))
|
||||
(pass-if-equal "Multiple values delay"
|
||||
'(1 2 3)
|
||||
(call-with-values
|
||||
(lambda () (force promise))
|
||||
list)))
|
||||
|
||||
(let ((promise (eager 1 2 3)))
|
||||
(pass-if-equal "Multiple values eager"
|
||||
'(1 2 3)
|
||||
(call-with-values
|
||||
(lambda () (force promise))
|
||||
list)))
|
||||
|
||||
(let ((promise (delay (values))))
|
||||
(pass-if-equal "Zero values delay"
|
||||
'()
|
||||
(call-with-values
|
||||
(lambda () (force promise))
|
||||
list)))
|
||||
|
||||
(let ((promise (eager)))
|
||||
(pass-if-equal "Zero values eager"
|
||||
'()
|
||||
(call-with-values
|
||||
(lambda () (force promise))
|
||||
list))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue