Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
more useful options
 
PerlMonks  

FoxtrotUniform's scratchpad

by FoxtrotUniform (Prior)
on Jun 02, 2004 at 00:20 UTC ( #358884=scratchpad: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @fn_refs = map {sub { print "$_\n"}} qw(foo bar baz);
    
    for (@fn_refs) {
        $_->();
    }
    
  2. or download this
    CODE(0x8105f9c)
    CODE(0x8105f9c)
    CODE(0x8105f9c)
    
  3. or download this
    my @fn_refs = map {my $x=$_; sub { print "$x\n"}} qw(foo bar baz);
    
    for (@fn_refs) {
        $_->();
    }
    
  4. or download this
    foo
    bar
    baz
    
  5. or download this
    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)
    
  6. or download this
    factorial n
      | n == 0    = 1
      | otherwise = n * factorial (n-1)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (17)
As of 2014-04-16 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (432 votes), past polls