]> gitweb.factorcode.org Git - factor.git/commitdiff
extra: "1 tail" is rest.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 30 Nov 2014 01:44:43 +0000 (17:44 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 30 Nov 2014 01:44:43 +0000 (17:44 -0800)
extra/imap/imap.factor
extra/python/syntax/syntax.factor

index 271ccff0a40a311463594ceb27d5d9e555eae7eb..2436af9b322c926ca84e28ef20daa71015fe1e76 100644 (file)
@@ -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 )
index 62a3fbddc2def2772104c1d2cb84ad6f2f50372a..17be91a8d027071894b7d9dd01c67573377bd188 100644 (file)
@@ -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 -- )