// Generated by bynkc — do not edit by hand.
// commons test

import { Ok, Err, Some, None, type Result, type Option, type ValidationError } from "./runtime.js";

export type Outcome =
    { readonly tag: "Won"; readonly prize: number }
  | { readonly tag: "Lost"; readonly reason: string }
  | { readonly tag: "Draw" };

export const Outcome = {
  Won: (prize: number): Outcome => ({ tag: "Won", prize }),
  Lost: (reason: string): Outcome => ({ tag: "Lost", reason }),
  Draw: { tag: "Draw" } as Outcome,
};

export function winFor(prize: number): Outcome {
  return Outcome.Won(prize);
}

export function nothing(): Outcome {
  return Outcome.Draw;
}

