Handbook
Glossary
gopher-print ( item-type body -- )
Vocabulary
gopher
.
cli
Inputs
item-type
an
object
body
an
object
Outputs
None
Definition
USING:
accessors
arrays
formatting
gopher.private
io
kernel
present
sequences
urls
;
IN:
gopher.cli
:
gopher-print
( item-type body -- )
PAGE
delete-all
gopher-text
swap
{
49 55
}
member?
[
[
dup
empty?
[
<gopher-link>
]
unless
]
map
]
when
[
dup
gopher-link?
[
dup
type>>
105
=
[
name>>
print
]
[
[
name>>
]
[
>url
present
]
bi
over
2array
PAGE
push
PAGE
length
swap
"[%s] %s\n"
printf
]
if
]
[
print
]
if
]
each
LINKS
delete-all
PAGE
LINKS
push-all
;