Handbook
Glossary
prev ( loc document quot: ( loc document -- loc ) -- loc )
Vocabulary
documents
.
elements
.
private
Inputs
loc
an
object
document
an
object
quot
a
quotation
with stack effect
( loc document -- loc )
Outputs
loc
an
object
Definition
USING:
combinators
documents
kernel
math
sequences
;
IN:
documents.elements.private
:
prev
( loc document quot: ( loc document -- loc ) -- loc )
{
{
[
pick
{
0 0
}
=
]
[
2drop
]
}
{
[
pick
second
zero?
]
[
drop
[
first
1
-
]
dip
line-end
]
}
[
call
]
}
cond
;
inline