From 0b8bd8e88f2620992310c7ba41283f5d9120e371 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Sun, 9 Jan 2022 22:24:07 +0000 Subject: Add rule for monadic function application --- apl9.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apl9.h') diff --git a/apl9.h b/apl9.h index e487b63..41ad5e2 100644 --- a/apl9.h +++ b/apl9.h @@ -24,6 +24,7 @@ typedef enum AtypeArray } arrayDataType; + /* Data types */ typedef struct Array Array; typedef struct Datum Datum; @@ -50,6 +51,8 @@ struct Datum }; }; +typedef Array* (*fnmonad)(Array*); + /* Function prototypes for the different source files */ /* print.c */ Rune *ppdatum(Datum); @@ -80,7 +83,8 @@ Array *fnCatenateFirst(Array *, Array *); /* Global variables */ extern Rune *errormsg; /* eval.c */ extern int datasizes[]; /* array.c */ -extern Rune primfuncnames[]; /* lexer.c */ +extern Rune primfuncnames[]; /* function.c */ extern Rune primmonopnames[]; /* lexer.c */ extern Rune primdyadopnames[]; /* lexer.c */ -extern Rune primhybridnames[]; /* lexer.c */ \ No newline at end of file +extern Rune primhybridnames[]; /* lexer.c */ +extern fnmonad monadfunctiondefs[]; /* function.c */ \ No newline at end of file -- cgit v1.2.3