                 { "path" [ >>path ] }
                 { "httponly" [ drop t >>http-only ] }
                 { "secure" [ drop t >>secure ] }
-                [ <cookie> dup , nip ]
+                [ drop rot <cookie> dup , ]
             } case
+            nip
         ] assoc-each
         drop
     ] { } make ;

! Copyright (C) 2003, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs base64 calendar calendar.format
calendar.parser combinators fry hashtables http.parsers io io.crlf
io.encodings.iana io.encodings.utf8 kernel make math math.parser
mime.types present sequences sets sorting splitting urls ;

        f swap
        (parse-set-cookie)
        [
            over >lower [ swapd ] dip {
                { "version" [ >>version ] }
                { "comment" [ >>comment ] }
                { "expires" [ [ cookie-string>timestamp >>expires ] unless-empty ] }
