Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created November 2, 2022 16:20
Show Gist options
  • Save BetterProgramming/9bf565091f0f7a143fc655e3ad766a5d to your computer and use it in GitHub Desktop.
Save BetterProgramming/9bf565091f0f7a143fc655e3ad766a5d to your computer and use it in GitHub Desktop.
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