extra: "1 tail" is rest.
parent
921e995ed9
commit
bcbd6c55e4
|
@ -57,7 +57,7 @@ CONSTANT: IMAP4_SSL_PORT 993
|
|||
read-?crlf drop
|
||||
] if-empty t
|
||||
]
|
||||
[ nip first 1 tail values f ] if-empty ;
|
||||
[ nip first rest values f ] if-empty ;
|
||||
|
||||
: read-response ( tag -- lines )
|
||||
"^%s (BAD|NO|OK) (.*)$" sprintf
|
||||
|
@ -81,7 +81,7 @@ CONSTANT: IMAP4_SSL_PORT 993
|
|||
|
||||
: parse-list-folders ( str -- folder )
|
||||
"\\* LIST \\(([^\\)]+)\\) \"([^\"]+)\" \"([^\"]+)\"" pcre:findall
|
||||
first 1 tail values [ utf7imap4 decode ] map ;
|
||||
first rest values [ utf7imap4 decode ] map ;
|
||||
|
||||
: parse-select-folder ( seq -- count )
|
||||
[ "\\* (\\d+) EXISTS" pcre:findall ] map harvest
|
||||
|
@ -98,7 +98,7 @@ CONSTANT: IMAP4_SSL_PORT 993
|
|||
|
||||
: parse-store-mail-line ( str -- pair/f )
|
||||
"\\(FLAGS \\(([^\\)]+)\\) UID (\\d+)\\)" pcre:findall [ f ] [
|
||||
first 1 tail values first2 [ " " split ] dip string>number swap 2array
|
||||
first rest values first2 [ " " split ] dip string>number swap 2array
|
||||
] if-empty ;
|
||||
|
||||
: parse-store-mail ( seq -- assoc )
|
||||
|
|
|
@ -46,7 +46,7 @@ SYMBOL: current-context
|
|||
call-word obj-word def>> effect make-function-quot effect define-inline ;
|
||||
|
||||
: make-method-quot ( name effect -- quot )
|
||||
[ in>> 1 tail gather-args-quot ] [ out>> unpack-value-quot ] bi swapd
|
||||
[ in>> rest gather-args-quot ] [ out>> unpack-value-quot ] bi swapd
|
||||
'[ @ rot _ getattr -rot call-object-full @ ] ;
|
||||
|
||||
: method-callable ( name effect -- )
|
||||
|
|
Loading…
Reference in New Issue