Handbook
Glossary
unify-variables ( in-diff in-ok? in-var out-diff out-ok? out-var vars -- ? )
Vocabulary
stack-checker
.
row-polymorphism
Inputs
in-diff
an
object
in-ok?
an
object
in-var
an
object
out-diff
an
object
out-ok?
an
object
out-var
an
object
vars
an
object
Outputs
?
an
object
Definition
USING:
combinators.short-circuit
kernel
;
IN:
stack-checker.row-polymorphism
::
unify-variables
( in-diff in-ok? in-var out-diff out-ok? out-var vars -- ? )
{
[
in-ok?
]
[
out-ok?
]
[
in-diff out-diff
=
]
}
0&&
dup
[
in-var
[
in-diff
swap
vars
adjust-variable
]
when*
out-var
[
out-diff
swap
vars
adjust-variable
]
when*
]
when
;