This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for wiki OneArmedIf version 1

author

cowan

comment


    

ipnr

127.10.177.1

name

OneArmedIf

readonly

0

text

The Scheme standards say that a one-armed `if` returns an unspecified value if the first argument is false.  The great majority of all Schemes tested have an "unspecified value" value, which is returned as the value of `(if #f #f)` and in other circumstances where the standards say that the value is unspecified.  The printing of this value is often suppressed by the REPL.  The following are exceptions:

`(if #f #f)` => `#f`:  Bigloo, JScheme, Dream, Owl Lisp

`(if #f #f)` => `()`:  NexJ, !TinyScheme, Elk, UMB, Llava, Dfsch, Inlab

`(if #f #f)` => `#t`:  Shoe, !FemtoLisp

`(if #f #f)` => a value which is both `#f` and `()`: XLisp, Rep

SXM returns a closure which when invoked apparently loops forever.

Note that although R6RS allows returning an unspecified number of unspecified values, including no values, no known Scheme implementation actually does so.

time

2013-06-22 23:18:47

version

1