| inspect | = | "nil" |
nil is an oddball object that always represents itself. It can not be mimicked and (alongside false) is one of the two false values.
Mimics
Inactive cells
Active cells
- &&(...)
- ?&(...)
- ?|(...)
- and(...)
- false?()
- nand(...)
- nil?()
- nor(...)
- not()
- or(...)
- true?()
- xor(...)
- ||(...)
Specs
Inactive cells (details)
Active cells (details)
nil
[ show source ]
macro(
argCount = call arguments length
if(
argCount ==(
1),
then = call arguments [](
0)
nil,
error!(Condition Error Invocation NoMatch, message: call message, context: call currentContext))
)
nil &&
- - should not evaluate it's argument
[ show source ]
x = 41 nil &&(x = 42) x should ==(41)
- - should return nil
[ show source ]
(nil &&(42)) should be nil
- - should be available in infix
[ show source ]
(nil &&(43)) should be nil
nil
[ show source ]
macro(
argCount = call arguments length
if(
argCount ==(
1),
then = call arguments [](
0)
nil,
error!(Condition Error Invocation NoMatch, message: call message, context: call currentContext))
)
nil ?&
- - should not evaluate it's argument
[ show source ]
x = 41 nil ?&(x = 42) x should ==(41)
- - should return nil
[ show source ]
(nil ?&(42)) should be nil
- - should be available in infix
[ show source ]
(nil ?&(43)) should be nil
nil
[ show source ]
macro( call argAt(0))
nil ?|
- - should evaluate it's argument
[ show source ]
x = 41 nil ?|(x = 42) x should ==(42)
- - should return the result of the argument
[ show source ]
(nil ?|(42)) should ==(42)
- - should be available in infix
[ show source ]
(nil ?|(43)) should ==(43)
Does not evaluate argument and returns nil
[ show source ]
macro(
argCount = call arguments length
if(
argCount ==(
1),
then = call arguments [](
0)
nil,
error!(Condition Error Invocation NoMatch, message: call message, context: call currentContext))
)
nil and
- - should not evaluate it's argument
[ show source ]
x = 41 nil and(x = 42) x should ==(41)
- - should return nil
[ show source ]
(nil and(42)) should be nil
- - should be available in infix
[ show source ]
(nil and(43)) should be nil
returns true.
[ show source ]
method( true)
nil false?
- - should return true
[ show source ]
nil false? should be true x = nil x false? should be true
Does not evaluate its argument and returns true
[ show source ]
macro(
argCount = call arguments length
cond(
argCount ==(
1),
other = call arguments [](
0)
true,
error!(Condition Error Invocation NoMatch, message: call message, context: call currentContext))
)
nil nand
- - should not evaluate it's argument
[ show source ]
x = 41 nil nand(x = 42) x should ==(41)
- - should return true
[ show source ]
(nil nand(42)) should be true (nil nand(false)) should be true (nil nand(nil)) should be true (nil nand(true)) should be true
- - should be available in infix
[ show source ]
(nil nand(43)) should be true
returns true.
[ show source ]
method( true)
nil nil?
- - should return true
[ show source ]
nil nil? should be true x = nil x nil? should be true
Evaluates its argument and returns the inverse of it
[ show source ]
macro(
argCount = call arguments length
cond(
argCount ==(
1),
other = call argAt(
0)
if(other, false, true),
error!(Condition Error Invocation NoMatch, message: call message, context: call currentContext))
)
nil nor
- - should evaluate it's argument
[ show source ]
x = 41 nil nor(x = 42) x should ==(42)
- - should complain if no argument is given
[ show source ]
fn(nil nor) should signal(Condition Error Invocation NoMatch)
- - should return false if the argument is true
[ show source ]
(nil nor(42)) should be false
- - should return false if the argument is false
[ show source ]
(nil nor(false)) should be true
- - should return false if the argument is nil
[ show source ]
(nil nor(nil)) should be true
- - should be available in infix
[ show source ]
(nil nor(43)) should be false
Does not evaluate arguments and returns true
[ show source ]
method( true)
nil not
- - should return true
[ show source ]
nil not should be true x = nil x not should be true
Evaluates the argument and returns the result
[ show source ]
macro( call argAt(0))
nil or
- - should evaluate it's argument
[ show source ]
x = 41 nil or(x = 42) x should ==(42)
- - should complain if no argument is given
[ show source ]
fn(nil or) should signal(Condition Error Index)
- - should return the result of the argument
[ show source ]
(nil or(42)) should ==(42)
- - should be available in infix
[ show source ]
(nil or(43)) should ==(43)
returns false
[ show source ]
method( false)
nil true?
- - should return false
[ show source ]
nil true? should be false x = nil x true? should be false
Evaluates the argument and returns the inverse of the inverse of the argument
[ show source ]
macro(
argCount = call arguments length
cond(
argCount ==(
1),
then = call argAt(
0)
if(then, true, false),
error!(Condition Error Invocation NoMatch, message: call message, context: call currentContext))
)
nil xor
- - should evaluate it's argument
[ show source ]
x = 41 nil xor(x = 42) x should ==(42)
- - should complain if no argument is given
[ show source ]
fn(nil xor) should signal(Condition Error Invocation NoMatch)
- - should return true if the argument is true
[ show source ]
(nil xor(true)) should be true
- - should return false if the argument is false
[ show source ]
(nil xor(false)) should be false
- - should return false if the argument is nil
[ show source ]
(nil xor(nil)) should be false
- - should be available in infix
[ show source ]
(nil xor(43)) should be true
nil
[ show source ]
macro( call argAt(0))
nil ||
- - should evaluate it's argument
[ show source ]
x = 41 nil ||(x = 42) x should ==(42)
- - should return the result of the argument
[ show source ]
(nil ||(42)) should ==(42)
- - should be available in infix
[ show source ]
(nil ||(43)) should ==(43)