1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-26 08:20:27 +00:00

Document array/push variadic argument

This commit is contained in:
Josef Pospíšil 2023-09-12 09:34:21 +02:00
parent 159c612924
commit 7f148522ab

View File

@ -177,8 +177,8 @@ JANET_CORE_FN(cfun_array_peek,
} }
JANET_CORE_FN(cfun_array_push, JANET_CORE_FN(cfun_array_push,
"(array/push arr x)", "(array/push arr & xs)",
"Insert an element in the end of an array. Modifies the input array and returns it.") { "Push all the elements of xs to the end of an array. Modifies the input array and returns it.") {
janet_arity(argc, 1, -1); janet_arity(argc, 1, -1);
JanetArray *array = janet_getarray(argv, 0); JanetArray *array = janet_getarray(argv, 0);
if (INT32_MAX - argc + 1 <= array->count) { if (INT32_MAX - argc + 1 <= array->count) {