Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
sub div($a, $b) {
|
||||
my $r;
|
||||
try {
|
||||
$r = $a / $b;
|
||||
CATCH {
|
||||
default { note "Unexpected exception, $_" }
|
||||
}
|
||||
}
|
||||
return $r // Nil;
|
||||
}
|
||||
say div(10,2);
|
||||
say div(1, sin(0));
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
multi div($a, $b) { return $a / $b }
|
||||
multi div($a, $b where { $b == 0 }) { note 'Attempt to divide by zero.'; return Nil }
|
||||
|
||||
say div(10, 2);
|
||||
say div(1, sin(0));
|
||||
Loading…
Add table
Add a link
Reference in a new issue