CSC 151 - Boolean values and predicate procedures
When writing complex programs, we often need to ask questions about the values with which we are computing. For example, should this entry come before this other entry when we sort the entries in a table or is this location within 100 miles of this second location? Frequently, these questions, which we often phrase as tests (not the same as unit tests), are used in control structures. For example, we might decide to do one thing if a value is a string and another if it is an integer. To express these kinds of questions, we need a variety of tools. First, we need a type in which to express the valid answers to questions. Second, we need a collection of procedures that can answer simple questions. Third, we need ways to combine questions. Finally, we need control structures that use these questions. In the subsequent sections of this reading, we consider each of these issues. We will return to more complex control structures in another reading. A Boolean value is a datum that reflects th
CSC 151 - Boolean values and predicate procedures Boolean values and predicate procedures Due Friday, 12 September 2025 --> Summary Many of Scheme’s control structures, such as conditionals (which you will learn about in a subsequent reading), need mechanisms for constructing tests that return the values true or false . These tests can also be useful for gathering information about a variety of kinds of values. In this reading, we consider the types, basic procedures, and mechanisms for combining results that support such tests. Introduction When writing complex programs, we often need to ask
Explore this link on the map →related reading
- CSC 151 - Conditional evaluation in Schemeeikmeier.sites.grinnell.edu
- First-order logic - Wikipediaen.wikipedia.org
- Structure and Interpretation of Computer Programsmitp-content-server.mit.edu
- CSC 151 - Anonymous procedureseikmeier.sites.grinnell.edu
- Comparison Operators in Google Sheets and Equivalent Functionsinfoinspired.com
- CSC 151 - Characters and stringseikmeier.sites.grinnell.edu
- List of logic symbols - Wikipediaen.wikipedia.org
- Intuitionistic logic - Wikipediaen.wikipedia.org
- CSC 151 - Mental models of computationeikmeier.sites.grinnell.edu
- Eat. Sleep. Math.eatsleepmath.tumblr.com
- 3. Logic - Mathematics in Lean v4.19.0 documentationleanprover-community.github.io
- CSC 151 - Basic typeseikmeier.sites.grinnell.edu