-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathboolean.go
More file actions
24 lines (21 loc) · 1.16 KB
/
boolean.go
File metadata and controls
24 lines (21 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// This Source Code Form is subject to the terms of the Mozilla Public License,
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
package lib
import "github.com/islisp-dev/iris/core"
// The values t and nil are called booleans. t denotes true, and nil is the only
// value denoting false. Predicates, also called boolean functions, are
// functions that return t when satisfied and nil otherwise. Any object other
// than nil is treated as true (not just t). When objects are treated as true or
// nil this way they are called quasi-booleans. t is an identifier naming the
// symbol t, and nil is an identifier naming the symbol nil (which is also the
// empty list). nil is the unique instance of the null class. Like boolean
// functions, the and and or special forms return truth values; however, these
// truth values are nil when the test is not satisfied and a non-nil value
// otherwise. The result of and and or are quasi-booleans. t is a named constant
// whose value is the symbol t itself. nil is a named constant whose value is
// the symbol nil itself.
var (
Nil = core.Nil
T = core.NewSymbol("T")
)