Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub fac(Int $n where $n >= 0) returns Int {
- if $n == 0 or $n == 1 {
- return 1;
- }
- $n * fac($n - 1);
- }
- fac(5) == 120 or die "Wrong value";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement