mirror of
https://github.com/janet-lang/janet
synced 2025-07-04 11:02:55 +00:00
Fix test import, and add sum as library fn too
This commit is contained in:
parent
6d9286a202
commit
5112ed77d6
@ -109,6 +109,11 @@ static const JanetReg cfuns[] = {
|
|||||||
"(numarray/scale numarray factor)\n\n"
|
"(numarray/scale numarray factor)\n\n"
|
||||||
"scale numarray by factor"
|
"scale numarray by factor"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"sum", num_array_sum,
|
||||||
|
"(numarray/sum numarray)\n\n"
|
||||||
|
"sums numarray"
|
||||||
|
},
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
(import build/numarray)
|
(import /build/numarray)
|
||||||
|
|
||||||
(def a (numarray/new 30))
|
(def a (numarray/new 30))
|
||||||
(print (get a 20))
|
(print (get a 20))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user