Find the last Sunday of each month: Difference between revisions

m
→‎{{header|Factor}}: tweak whitespace
m (→‎{{header|Factor}}: tweak whitespace)
Line 1,143:
=={{header|Factor}}==
This program expects a year passed in via command line argument. In case you are wondering — yes — Factor has a <tt>last-sunday-of-month</tt> word in its calendar vocabulary. This is par for the course when it comes to Factor.
<lang factor>USING: calendar calendar.format command-line io kernel math math.parser
<lang factor>
USING: calendar calendar.format command-line io kernel math math.parser
sequences ;
IN: rosetta-code.last-sunday
Line 1,154 ⟶ 1,153:
: main ( -- ) parse-year 12 [ process-month ] times drop ;
 
MAIN: main</lang>
</lang>
{{out}}
<pre>
1,808

edits