Initial commit++
This commit is contained in:
parent
5a4851880b
commit
8c366dea82
|
@ -1,3 +1,7 @@
|
|||
# Mind-Fuck
|
||||
|
||||
jesus fuck what is this
|
||||
|
||||
## ???-recurse.raku
|
||||
|
||||
How are recursive function calls impacted by dynamic variables?
|
||||
|
|
19
dyn-recurse.raku
Executable file
19
dyn-recurse.raku
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env raku
|
||||
|
||||
use v6.d;
|
||||
|
||||
sub plus-one {
|
||||
$*number++;
|
||||
|
||||
say $*number;
|
||||
|
||||
return if 100 < $*number;
|
||||
|
||||
plus-one;
|
||||
}
|
||||
|
||||
sub MAIN {
|
||||
my Int $*number = 42;
|
||||
|
||||
plus-one;
|
||||
}
|
19
lex-recurse.raku
Executable file
19
lex-recurse.raku
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env raku
|
||||
|
||||
use v6.d;
|
||||
|
||||
sub plus-one {
|
||||
$number++;
|
||||
|
||||
say $number;
|
||||
|
||||
return if 100 < $number;
|
||||
|
||||
plus-one;
|
||||
}
|
||||
|
||||
sub MAIN {
|
||||
my Int $number = 42;
|
||||
|
||||
plus-one;
|
||||
}
|
Loading…
Reference in a new issue