Help for this page

Select Code to Download


  1. or download this
    my $x = 1;
    my $f = sub { $x };
    ...
        print $f->(), "\n"; # => 2
    }
    print $f->(), "\n"; # => 1
    
  2. or download this
    sub lambda {
        my $f = $_[1];
    ...
            }
        }
    }