Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lambda
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
# -*- 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))
[
+
]
Show input
edit mode
|
history
|
discussion