Skip to content

Instantly share code, notes, and snippets.

@mfollett
Created August 30, 2010 03:08
Show Gist options
  • Save mfollett/556962 to your computer and use it in GitHub Desktop.
Save mfollett/556962 to your computer and use it in GitHub Desktop.
functional programming blog, week 2 example 3
my $fun
{
my $value = 42;
$fun = sub {$value};
}
say $fun->(); # prints "42\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment