From bcbd6c55e4387f0ab1e027ef34d1096e6cf5206d Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 29 Nov 2014 17:44:43 -0800 Subject: [PATCH] extra: "1 tail" is rest. --- extra/imap/imap.factor | 6 +++--- extra/python/syntax/syntax.factor | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extra/imap/imap.factor b/extra/imap/imap.factor index 271ccff0a4..2436af9b32 100644 --- a/extra/imap/imap.factor +++ b/extra/imap/imap.factor @@ -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 ) diff --git a/extra/python/syntax/syntax.factor b/extra/python/syntax/syntax.factor index 62a3fbddc2..17be91a8d0 100644 --- a/extra/python/syntax/syntax.factor +++ b/extra/python/syntax/syntax.factor @@ -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 -- )