Skip to content

Commit bbaa158

Browse files
committed
fix:Added missing default value.
1 parent 9e3f021 commit bbaa158

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Math/DistanceFunctions/Native.rakumod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ multi sub dot-product($v1, $v2 --> Numeric:D) {
7373
#-----------------------------------------------------------
7474
our proto sub norm(| --> Numeric:D) is export {*}
7575

76-
multi sub norm(:v(:$vector)!, Str:D :p(:$type) --> Numeric:D) {
76+
multi sub norm(:v(:$vector)!, Str:D :p(:$type) = '2' --> Numeric:D) {
7777
return norm($vector, :$type);
7878
}
7979

80-
multi sub norm($v, Str:D :p(:$type) --> Numeric:D) {
80+
multi sub norm($v, Str:D :p(:$type) = '2' --> Numeric:D) {
8181

8282
if !(($v ~~ Positional:D) && ($v.all ~~ Numeric:D)) {
8383
die "The first argument is expected to be a numeric array.";

0 commit comments

Comments
 (0)