[plug] I would write 500 lines, and I would write 500 more...
Cameron Patrick
cameron at patrick.wattle.id.au
Mon Dec 15 15:30:24 WST 2003
On Mon, Dec 15, 2003 at 03:06:18PM +0800, James Devenish wrote:
| > in Ruby: 500.times{puts "I will not throw paper airplanes in class."}
|
| in zsh:
| repeat 500 echo I will not throw paper airplanes in class.
Both of these have rubbed in to me that Python's iteration construct
sucks, BTW. :-)
for x in range(500): print "I will not throw paper aeroplanes in class."
# (The Pythons would never have used a Merkin word like "airplane")
But it's better than in Haskell:
write_lines 0 = return ()
write_lines n = do putStr "I will not throw paper aeroplanes in class.\n"
write_lines (n-1)
main = write_lines 500
Cameron.
More information about the plug
mailing list