1 USING: macros kernel words quotations io sequences combinators
3 IN: calendar.format.macros
5 MACRO: formatted ( spec -- )
8 { [ dup word? ] [ 1quotation ] }
9 { [ dup quotation? ] [ ] }
10 [ [ nip write ] curry [ ] like ]
12 ] map [ cleave ] curry ;
14 MACRO: attempt-all-quots ( quots -- )
15 dup length 1 = [ first ] [
17 [ nip attempt-all-quots ] curry