Implement recursion
This commit is contained in:
parent
65f17aba82
commit
59610c58a1
1 changed files with 6 additions and 1 deletions
|
@ -362,7 +362,12 @@ sub macro_defun {
|
|||
|
||||
return sub {
|
||||
my $ctx = shift;
|
||||
my $fn = $body->($ctx);
|
||||
my $fn;
|
||||
my $self = sub {
|
||||
return $fn->(@_);
|
||||
};
|
||||
$ctx->{$ident->{value}} = $self;
|
||||
$fn = $body->($ctx);
|
||||
$ctx->{$ident->{value}} = $fn;
|
||||
return $fn;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue