sub curry { my $arg = shift; return sub { return 1 + $arg } } my $code = curry(1); say $code->();