Handbook
Glossary
effect= ( effect1 effect2 -- ? )
Factor handbook
»
Developer tools
»
Stack effect tools
Prev:
effect<= ( effect1 effect2 -- ? )
Next:
effect
Vocabulary
effects
Inputs
effect1
an
effect
effect2
an
effect
Outputs
?
a
boolean
Word description
Tests if
effect1
and
effect2
represent the same stack transformation, without looking parameter names.
Examples
USING: effects prettyprint ; ( a -- b ) ( x -- y ) effect= .
t
Definition
USING:
accessors
kernel
sequences
;
IN:
effects
:
effect=
( effect1 effect2 -- ? )
2dup
[
in>>
length
]
same?
[
2dup
[
out>>
length
]
same?
[
[
terminated?>>
]
same?
]
[
2drop
f
]
if
]
[
2drop
f
]
if
;