Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Reflections on “Higher Order Perl” §1.1

by John M. Dlugosz (Monsignor)
on Jun 04, 2009 at 21:35 UTC ( [id://768595]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # step 1
    sub binary {
    ...
    #step 4
       return $E . $b;
       }
    
  2. or download this
    # step 1
    sub binary ($n) {
    ...
    #step 4
       return $E ~ $b;
       }
    
  3. or download this
    sub binary (0|1 $n) { $n }
    
    ...
       my $E = binary($k);
       return $E ~ $b;
       }
    
  4. or download this
    sub binary (Int where { $_ < 0 } $n)
    {
       my $E= binary(-$n);
       return "-" ~ $E;
    }
    
  5. or download this
    subset NegativeInt of Int where { $_ < 0 } # I decided to declare it a
    +fter all
    subset PositiveInt of Int where { $_ > 0 }
    ...
          return "-" ~ binary(-$n);
          }
    }
    
  6. or download this
       PRE { !defined($wordsize) || frac($wordsize)==0 }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://768595]
Approved by zwon
Front-paged by zwon
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found