llm
Download
13 lines 253 BCModified 2026-08-31 raw
12345678910111213
// Representation of closures (functions paired with captured data)

#pragma once

#include <stddef.h>

typedef struct {
    void *fn, *userdata;
} Closure_t;

typedef Closure_t OptionalClosure_t;

#define NONE_CLOSURE ((OptionalClosure_t){.fn = NULL})