Hi Neil, Neil Jerram <n...@ossau.homelinux.net> writes:
> In the following, is the last result a bug? > > GNU Guile 2.0.9-deb+1-1 > Copyright (C) 1995-2013 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> (values 'a 'b) > $1 = a > $2 = b > scheme@(guile-user)> (or (values 'a 'b)) > $3 = a > $4 = b > scheme@(guile-user)> (or #f (values 'a 'b)) > $5 = a > $6 = b > scheme@(guile-user)> (or (values 'a 'b) (values 'c 'd)) > $7 = a > > In other words it seems 'or' doesn't propagate multiple values in a > non-tail position. Is that expected? I think so, yes. > The manual section 'Returning and Accepting Multiple Values' does > mention tail position, but only in passing, and it isn't obvious to me > why that restriction should exist. 'or' needs to test whether the results of the non-final expressions are true or false. It's not clear how this should be generalized to multiple values. Mark