skopy/lib/include/nfun.h

23 lines
431 B
C

#ifndef SK_NFUN_H
#define SK_NFUN_H
#include "commons.h"
#include "state.h"
typedef SK (*nfun_body)(struct state*, struct sym*, struct vec*);
struct nfun
{
nfun_body body;
int arity;
};
void nfun_init(struct nfun* self, nfun_body body, int arity);
void nfun_free(struct nfun* self);
SK nfun_call(struct nfun* self,
struct state* state,
struct sym* sym,
struct vec* args);
#endif