Handbook
Glossary
pprint-prefixed-number ( n quot: ( n -- n' ) pre -- )
Vocabulary
prettyprint
.
backend
Inputs
n
an
object
quot
a
quotation
with stack effect
( n -- n' )
pre
an
object
Outputs
None
Definition
USING:
kernel
math
prettyprint.sections
sequences
;
IN:
prettyprint.backend
:
pprint-prefixed-number
( n quot: ( n -- n' ) pre -- )
pick
neg?
[
[
neg
]
[
call
]
[
prepend
]
tri*
"-"
prepend
text
]
[
[
call
]
[
prepend
]
bi*
text
]
if
;
inline