Re: lambda :-)
lance@fox.com
Fri, 26 Aug 94 8:06:36 PDT
> From: Ulf Bartelt <stub@pce60.rz.tu-clausthal.de>
> Date: Thu, 25 Aug 1994 21:42:31 GMT
>
> #!/usr/local/bin/python --
> # -*-python-*-
> #
> # It's REAL fun using lambda...
> # ...but this is an example on how *NOT* to use it...
> #
> import math
>
> print filter(None,map(lambda y:y*reduce(lambda x,y:x*y!=0,map(lambda x,y=y:y%x,range(2,int(pow(y,0.5)+1))),1),range(2,1000)))
Works fine for me under 1.0.3. nice prime number generator..
Was it susposed to crash or something?
--
Lance Ellinghouse lance@fox.com