Boolean

From Erights

Revision as of 02:50, 2 July 2008 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

Signature: pick(t, f) :any

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

not/0

Signature: not() :Boolean

Boolean negation.

or/1

Signature: or(other :Boolean) :Boolean

Boolean or. The argument is coerced to a boolean.

and/1

Signature: and(other :Boolean) :Boolean

Boolean and. The argument is coerced to a boolean.

xor/1

Signature: 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