 <PRIVATE
 
 : (holidays) ( singleton -- seq )
-    all-words swap '[ "holiday" word-prop _ swap key? ] filter ;
+    all-words [ "holiday" word-prop key? ] with filter ;
 
 M: object holidays
     (holidays) [ execute( timestamp -- timestamp' ) ] with map ;
 
 PRIVATE>
 
-M: all holidays
-    drop
-    all-words [ "holiday" word-prop key? ] with filter ;
+M: all holidays drop (holidays) ;
 
 : holiday? ( timestamp/n singleton -- ? )
     [ holidays ] [ drop ] 2bi '[ _ same-day? ] any? ;

    parse-definition ( timestamp/n -- timestamp ) define-declared ;

SYNTAX: HOLIDAY-NAME:
    [let scan-word "holiday" word-prop :> holidays scan-word :> name scan-object :> value
    value name holidays set-at ] ;
>>


! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs calendar fry kernel locals parser
sequences vocabs words ;
IN: calendar.holidays

SINGLETONS: all world commonwealth-of-nations ;
