Boolean

From Erights

(Difference between revisions)
Jump to: navigation, search
(category)
Line 36: Line 36:
Comparison with other Booleans. See [[Message op__cmp]].
Comparison with other Booleans. See [[Message op__cmp]].
 +
 +
[[Category:ELib specification]]

Revision as of 02:31, 2 July 2008

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