Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Lambda

# -*- coding: utf-8 -*-
# ============================================================================
"""
    λ

    Author: Sang Han
      Year: 2014
      
    Run it: http://rextester.com/BIDCO35100
"""
# ============================================================================
class Lambda:
    """
    Params: Int: n

    Returns a callable λ class instance which impements
    a prime sieve algorithm from 2 to n.
    """
    \
                   def __call__(self,n):\
                         return ( lambda \
                                very_math:\
                                 map(lambda\
                                 __lololol_:\
                                      filter(
                               (( ( ((None)) ) )),
                          (map(lambda __suchwoow:\
                    map(lambda  __because___yolo__:\
          __lololol_.__setitem__((      (__because___yolo__))  ,                (0)),
    range(2*(__suchwoow),               ((very_math)),     __suchwoow               ) ),
range(2,very_math)),                    (__lololol_))[1])[1:],[range(very_math)])[0])(n)

# ===========================================================================================

if __name__ == '__main__':
    primes = Lambda()

    print(primes(10**5))
 run  | edit  | history  | help 0