Fundamentals of CS I (CS151 2001S) : Reference

boolean? - determine if a value is a Boolean value

Procedureboolean?
Parametersval, a value
PurposeDetermines if val is a Boolean value (#t or #f).
ProducesA truth value: true (#t) if val is a Boolean value, false (#f) if it's not.
PreconditionsOnly one parameter (verified).
Examples
> (boolean? #f)
#t
> (boolean? #t)
#t
> (boolean? 'true)
#f
> (boolean? "true")
#f
> (boolean? null)
#f

Disclaimer: I usually create these pages on the fly. This means that they are rarely proofread and may contain bad grammar and incorrect details. It also means that I may update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This page was generated by Siteweaver on Thu Feb 22 05:47:34 2001.
This page may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2001S/boolean-p.html.
You may validate this page's HTML.
The source was last modified Wed Jan 31 22:17:28 2001.