     zoneinfo-country-zones
     [ [ codes>> ] [ tz>> ] bi [ 2array ] curry map ] map concat ;
 
-MEMO: tz>country-map ( -- alist )
+: lookup-country-name ( seq -- seq' ) alpha-2 ?at drop ; inline
+: lookup-country-names ( seq -- seq' ) [ lookup-country-name ] map ;
+
+: timezone>country-map ( -- alist )
+    parse-zonetabs [ second ] collect-key-by ;
+
+: country>timezones-map ( -- alist )
     parse-zonetabs [ first ] collect-value-by ;
 
-MEMO: country>tzs-map ( -- alist )
-    parse-zonetabs [ second ] collect-key-by ;
+: country-timezones-map ( -- alist )
+    country>timezones-map [ dup lookup-country-names zip ] map-values ;
 
 SYMBOL: last-zone
 

! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays ascii assocs assocs.extras calendar
calendar.english combinators combinators.short-circuit
combinators.smart csv grouping interval-maps io.encodings.utf8
io.files kernel math math.parser memoize namespaces sequences
sequences.extras sorting splitting splitting.extras ;
QUALIFIED: sets
IN: zoneinfo



: parse-zoneinfo-file ( path -- seq )
    zoneinfo-lines
    [ "\t " split harvest ] map harvest
    [ parse-zoneinfo-line ] map ;

MEMO: zoneinfo-files ( -- seq )
