Add mapcar builtin, more tests, fixes

This commit is contained in:
2022-11-05 20:47:33 -04:00
parent f9ace289f1
commit 4da62ad2da
7 changed files with 144 additions and 23 deletions

View File

@@ -73,7 +73,7 @@ struct ucl_object *ucl_list_length(struct ucl_object *list) {
struct ucl_object *ucl_list_nth(struct ucl_object *list, int n) {
UCL_COND_OR_RET_ERROR(
list != NULL && list->type == UCL_TYPE_CELL,
"Invalid type of argument 0 to 'ucl_list_'");
"Invalid type of argument 0 to 'ucl_list_nth'");
int length = ucl_list_length(list)->integer;
UCL_COND_OR_RET_ERROR(length > n, "Position n >= list length in ucl_list_nth");