Help for this page
my @fn_refs = map {sub { print "$_\n"}} qw(foo bar baz); for (@fn_refs) { $_->(); }
CODE(0x8105f9c) CODE(0x8105f9c) CODE(0x8105f9c)
my @fn_refs = map {my $x=$_; sub { print "$x\n"}} qw(foo bar baz); for (@fn_refs) { $_->(); }
foo bar baz
sieve :: [Int] -> [Int] -> [Int] -- sieve [] xs ... -- of marking composite numbers, we remove them. sieve p [] = reverse p sieve p (x:xs) = sieve (x:p) (filter (\t -> (rem t x /= 0)) xs)
factorial n | n == 0 = 1 | otherwise = n * factorial (n-1)
www.com | www.net | www.org
Never Hardly ever Occasionally Fairly regularly Frequently
Results (17 votes). Check out past polls.