skopy/lib/include/nfun.h

22 lines
388 B
C
Raw Normal View History

2024-04-06 18:44:58 +00:00
#ifndef SK_NFUN_H
#define SK_NFUN_H
#include "commons.h"
#include "state.h"
typedef SK (*nfun_body)(struct state*, struct vec*);
struct nfun
{
nfun_body body;
int arity;
2024-04-06 18:44:58 +00:00
};
void nfun_init(struct nfun* self, nfun_body body, int arity);
2024-04-06 18:44:58 +00:00
void nfun_free(struct nfun* self);
SK nfun_call(struct nfun* self,
struct state* state,
struct vec* args);
#endif