Handbook
Glossary
peek-front* ( deque -- obj ? )
Vocabulary
deques
Inputs
deque
a
deque
Outputs
obj
an
object
?
a
boolean
Generic word contract
Returns the object at the front of the deque, and a boolean indicating if an object was found.
Definition
IN:
deques
GENERIC:
peek-front*
( deque -- obj ? )
Methods
USING:
accessors
deques
dlists
kernel
;
M:
dlist
peek-front*
front>>
[
obj>>
t
]
[
f
f
]
if*
;
USING:
accessors
deques
search-deques
;
M:
search-deque
peek-front*
deque>>
peek-front*
;
USING:
accessors
deques
kernel
sequences.private
unrolled-lists
;
M:
unrolled-list
peek-front*
dup
front>>
[
[
front-pos>>
]
dip
data>>
nth-unsafe
t
]
[
drop
f
f
]
if*
;