Handbook
Glossary
nil? ( object -- ? )
Factor handbook
»
The language
»
Collections
»
Lists
»
The list protocol
Prev:
cdr ( cons -- cdr )
Vocabulary
lists
Inputs
object
an
object
Outputs
?
a
boolean
Word description
Return true if the cons object is the nil cons.
See also
nil
Definition
IN:
lists
GENERIC:
nil?
( object -- ? )
Methods
USING:
kernel
lists
;
M:
+nil+
nil?
drop
t
;
USING:
kernel
lists
lists.lazy
;
M:
lazy-append
nil?
drop
f
;
USING:
accessors
kernel
lists
lists.lazy
;
M:
lazy-concat
nil?
dup
car>>
nil?
[
cdr>>
nil?
]
[
drop
f
]
if
;
USING:
lists
lists.lazy
;
M:
lazy-cons-state
nil?
car
nil?
;
USING:
accessors
combinators
kernel
lists
lists.lazy
lists.lazy.private
;
M:
lazy-filter
nil?
{
{
[
dup
cons>>
nil?
]
[
drop
t
]
}
{
[
dup
car-filtered?
]
[
drop
f
]
}
[
skip
nil?
]
}
cond
;
USING:
kernel
lists
lists.lazy
;
M:
lazy-from-by
nil?
drop
f
;
USING:
lists
lists.lazy
;
M:
lazy-io
nil?
car
nil?
;
USING:
accessors
lists
lists.lazy
;
M:
lazy-map
nil?
cons>>
nil?
;
USING:
accessors
kernel
lists
lists.lazy
math
;
M:
lazy-take
nil?
dup
n>>
zero?
[
drop
t
]
[
cons>>
nil?
]
if
;
USING:
kernel
lists
lists.lazy
;
M:
lazy-until
nil?
drop
f
;
USING:
accessors
combinators
kernel
lists
lists.lazy
;
M:
lazy-while
nil?
[
car
]
keep
quot>>
( elt -- ? )
call-effect
not
;
USING:
kernel
lists
lists.lazy
;
M:
lazy-zip
nil?
drop
f
;
USING:
lazy
lists
;
M:
lazy
nil?
force
nil?
;
USING:
accessors
kernel
lists
lists.lazy
;
M:
memoized-cons
nil?
dup
nil?>>
+not-memoized+
eq?
[
dup
original>>
nil?
[
>>nil?
drop
]
keep
]
[
nil?>>
]
if
;
USING:
kernel
lists
;
M:
object
nil?
drop
f
;
USING:
kernel
lists
lists.lazy
;
M:
sequence-cons
nil?
drop
f
;