Help for this page

Select Code to Download


  1. or download this
    package Lambda;
    
    ...
    }
    
    1;
    
  2. or download this
    use strict;
    use warnings;
    ...
       my $f = lambda($x => sub { $x });
       is($f->('test'), 'test', 'tied');
    }
    
  3. or download this
    1..10
    ok 1 - use Lambda;
    ...
    #          got: undef
    #     expected: 'test'
    # Looks like you failed 2 tests of 10.
    
  4. or download this
    package Lambda;
    
    ...
    }
    
    1;
    
  5. or download this
    use strict;
    use warnings;
    ...
       my $f = lambda { $_ };
       is($f->('test'), 'test', 'tied');
    }
    
  6. or download this
    1..6
    ok 1 - use Lambda;
    ...
    ok 4 - restore
    ok 5 - alias
    ok 6 - tied