Handbook
Glossary
consolidate ( -- seq )
POP3 client library
Prev:
top ( message# #lines -- seq )
Next:
uidl ( message# -- uidl )
Vocabulary
pop3
Inputs
None
Outputs
seq
a
sequence
Word description
Builds a sequence of email tuples, iterating over each email top and consolidating its headers with its number, uidl, and size.
Definition
USING:
accessors
assocs
combinators
kernel
math
pop3.private
ranges
sequences
;
IN:
pop3
:
consolidate
( -- seq )
count
zero?
[
"No mail for account."
]
[
1
account
count>>
[a..b]
[
{
[
0
top
drop
]
[
<message>
swap
>>#
]
[
uidls
at
>>uidl
]
[
list
at
>>size
]
}
cleave
"From:"
headers
at
>>from
"To:"
headers
at
>>to
"Subject:"
headers
at
>>subject
account
[
swap
suffix
]
change-messages
drop
]
each
account
messages>>
]
if
;