1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-25 22:53:16 +00:00

Fix test import, and add sum as library fn too

This commit is contained in:
Josef Pospíšil 2021-12-09 11:12:08 +01:00
parent 6d9286a202
commit 5112ed77d6
2 changed files with 6 additions and 1 deletions

View File

@ -109,6 +109,11 @@ static const JanetReg cfuns[] = {
"(numarray/scale numarray factor)\n\n"
"scale numarray by factor"
},
{
"sum", num_array_sum,
"(numarray/sum numarray)\n\n"
"sums numarray"
},
{NULL, NULL, NULL}
};

View File

@ -1,4 +1,4 @@
(import build/numarray)
(import /build/numarray)
(def a (numarray/new 30))
(print (get a 20))