John Bokma <j...@castleamber.com> writes: > Jonathan Gardner <jgard...@jonathangardner.net> writes: > >> On Feb 18, 8:15 am, Steve Howell <showel...@yahoo.com> wrote: >>> >>> def print_numbers() >>> [1, 2, 3, 4, 5, 6].map { |n| >>> [n * n, n * n * n] >>> }.reject { |square, cube| >>> square == 25 || cube == 64 >>> }.map { |square, cube| >>> cube >>> }.each { |n| >>> puts n >>> } >>> end >>> >> >> If this style of programming were useful, we would all be writing Lisp >> today. As it turned out, Lisp is incredibly difficult to read and >> understand, even for experienced Lispers. I am pleased that Python is >> not following Lisp in that regard. >> >> for n in range(1,6): > > ^ should be 7 > > But for the rest, I agree with you. I can read Steve's version, but even > to an experienced Perl programmer that looks quite noisy :-)
Oh, wait, it's Ruby :-D. -- John Bokma j3b Hacking & Hiking in Mexico - http://johnbokma.com/ http://castleamber.com/ - Perl & Python Development -- http://mail.python.org/mailman/listinfo/python-list