Created
November 2, 2022 16:20
-
-
Save BetterProgramming/9bf565091f0f7a143fc655e3ad766a5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct CError { | |
int code; | |
char* message; | |
} CError; | |
typedef enum EitherType { | |
intValue = 0, | |
stringValue = 1 | |
} EitherType; | |
typedef struct Either { | |
CError* error; | |
void* value; | |
EitherType type; | |
} Either; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment