Boolean

From Erights

Revision as of 19:47, 21 April 2007 by Kevin Reid (Talk | contribs)
Jump to: navigation, search

The Boolean type has exactly two members, false and true. All three names are in the universal scope.

Contents

Protocol

pick/2

pick(t, f) :any

false.pick(t, f) returns f; true.pick(t, f) returns t.

not/0

not() :Boolean

Boolean negation.

or/1

or(other :Boolean) :Boolean

Boolean or. The argument is coerced to a boolean.

and/1

and(other :Boolean) :Boolean

Boolean and. The argument is coerced to a boolean.

xor/1

xor(other :Boolean) :Boolean

Boolean exclusive or. The argument is coerced to a boolean.

op__cmp/1

Comparison with other Booleans. See Message op__cmp.

Personal tools
more tools