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

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

export function identity<A>(x: A): A {
  return x;
}

export function compose<A, B, C>(f: (a0: A) => B, g: (a0: B) => C, x: A): C {
  return g(f(x));
}

export function map_one<A, B>(f: (a0: A) => B, x: A): B {
  return f(x);
}

export function demo(): number {
  const a = identity(5);
  const b = map_one((n) => n + 1, a);
  return compose((n: number) => n * 2, (n) => n + 3, b);
}

