35 fprintf(stderr,
"Runtime type error: INDEX_OF expects (array, value)\n");
int array_index_of(const Value *v, const Value *needle)
Find the index of the first occurrence of an element in an array.
push_value(vm, make_int(idx))
Tagged union representing a Fun value.
Value make_int(int64_t v)
Construct a Value representing a 64-bit integer.
static Value pop_value(VM *vm)
Pop a Value from the VM operand stack.