Handbook
Glossary
dlist-length ( dlist -- n )
Vocabulary
dlists
Inputs
dlist
a
dlist
Outputs
n
a non-negative number
Word description
Calculates the length of the linked list.
Notes
This operation is O(n).
Definition
USING:
kernel
kernel.private
math
;
IN:
dlists
:
dlist-length
( dlist -- n )
0
swap
[
drop
{
fixnum
}
declare
1
+
f
]
dlist-find-node
drop
;
flushable