map is useless!

D'Arcy J.M. Cain darcy at druid.net
Sun Jun 6 19:56:50 EDT 2010


On Mon, 07 Jun 2010 05:59:02 +1000
Lie Ryan <lie.1296 at gmail.com> wrote:
> > foo = lambda x: [y + 1 for y in x]
> > [foo(x) for x in [[4, 6, 3], [6, 3, 2], [1, 3, 5]]]
> > 
> > Didn't seem like such a long walk.
> > 
> 
> that's because you're simplifying the problem, the correct walk is:

Well, since it gives the same answer and you didn't actually state the
problem I'm not sure how you can make that statement.

Show me the unit test that defines the problem.

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list