]> gitweb.factorcode.org Git - factor.git/commitdiff
holidays.factor: Replaced use of deprecated 'spin' word with locals.
authorotoburb <otoburb@gmail.com>
Tue, 15 Mar 2011 01:51:27 +0000 (01:51 +0000)
committerotoburb <otoburb@gmail.com>
Tue, 15 Mar 2011 01:51:27 +0000 (01:51 +0000)
extra/calendar/holidays/holidays.factor
extra/calendar/holidays/us/us.factor

index 0b8a1bb781d4e94cf7954014502f439f496182b7..7a87a1df45a26d7c7c25d25f65288b12cc1692f9 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs calendar fry kernel parser sequences
-shuffle vocabs words memoize ;
+USING: accessors assocs calendar fry kernel locals parser 
+sequences vocabs words memoize ;
 IN: calendar.holidays
 
 SINGLETONS: all world commonwealth-of-nations ;
@@ -15,7 +15,8 @@ SYNTAX: HOLIDAY:
     parse-definition (( timestamp/n -- timestamp )) define-declared ;
 
 SYNTAX: HOLIDAY-NAME:
-    scan-word "holiday" word-prop scan-word scan-object spin set-at ;
+    [let scan-word "holiday" word-prop :> holidays scan-word :> name scan-object :> value
+    value name holidays set-at ] ;
 >>
 
 GENERIC: holidays ( n singleton -- seq )
index 538836952f339fd842262eb8d12bc8598867083a..87c367f941bd9cfa1db032aa0e0baa7254d6d19a 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors assocs calendar calendar.holidays
 calendar.holidays.private combinators combinators.short-circuit
-fry kernel lexer math namespaces parser sequences shuffle
+fry kernel lexer math namespaces parser sequences 
 vocabs words ;
 IN: calendar.holidays.us