Handbook
Glossary
effect>string ( obj -- str )
Factor handbook
»
Developer tools
»
Stack effect tools
Prev:
stack-effect ( word -- effect/f )
Next:
effect-height ( effect -- n )
Vocabulary
effects
Inputs
obj
an
object
Outputs
str
a
string
Word description
Turns a stack effect object into a string mnemonic.
Examples
USING: effects io ; { "x" } { "y" "z" } <effect> effect>string print
( x -- y z )
Definition
IN:
effects
GENERIC:
effect>string
( obj -- str )
Methods
USING:
accessors
effects
effects.private
kernel
make
;
M:
effect
effect>string
[
"( "
%
dup
in-var>>
var-picture%
dup
in>>
stack-picture%
"-- "
%
dup
out-var>>
var-picture%
dup
out>>
stack-picture%
dup
terminated?>>
[
"* "
%
]
when
drop
")"
%
]
""
make
;
USING:
effects
math
math.parser
;
M:
integer
effect>string
number>string
;
USING:
effects
kernel
;
M:
object
effect>string
drop
"object"
;
USING:
arrays
effects
kernel
sequences
sequences.private
;
M:
pair
effect>string
first2-unsafe
over
[
[
effect>string
]
bi@
": "
glue
]
[
nip
effect>string
":"
prepend
]
if
;
USING:
effects
strings
;
M:
string
effect>string
;
USING:
accessors
effects
words
;
M:
word
effect>string
name>>
;