Handbook
Glossary
(balance-actual-depth) ( declared actual -- depth/f )
Vocabulary
stack-checker
.
row-polymorphism
Inputs
declared
an
object
actual
an
object
Outputs
depth/f
an
object
Definition
USING:
accessors
combinators
combinators.short-circuit
kernel
math
sequences
;
IN:
stack-checker.row-polymorphism
::
(balance-actual-depth)
( declared actual -- depth/f )
{
{
[
{
[
declared
in-var>>
]
[
declared
out-var>>
not
]
[
actual
out>>
length
declared
out>>
length
<
]
}
0&&
]
[
declared
out>>
length
actual
out>>
length
-
]
}
{
[
{
[
declared
in-var>>
not
]
[
declared
out-var>>
]
[
actual
in>>
length
declared
in>>
length
<
]
}
0&&
]
[
declared
in>>
length
actual
in>>
length
-
]
}
[
f
]
}
cond
;