Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Transform Sequence Problem

by wbirkett (Novice)
on Jun 19, 2013 at 11:45 UTC ( #1039758=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use B::Deparse;
    print "@out\n";
  2. or download this
    # some code references
    $f1 = sub {map {$_ + 1} @_};
    $f2 = sub {map {log($_)} @_};
    $f3 = sub {map {$_ * 3} @_};
  3. or download this
     # combined transform
    sub trans1 {&$f3(&$f2(&$f1))};
    @trans = trans1(@data);
    print "@trans\n";
  4. or download this
    # make a sequence array
    @seq = ($f1, $f2, $f3);
    @trans = trans2(@data);
    print "@trans\n";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1039758]
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-10-25 05:54 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (315 votes). Check out past polls.