Improve and abstract Cursor design. Start scanner

This commit is contained in:
Yura Dupyn 2026-02-06 00:38:16 +01:00
parent d382b16e6d
commit d5f9777711
8 changed files with 713 additions and 476 deletions

10
src/result.ts Normal file
View file

@ -0,0 +1,10 @@
export type Result<T, E> =
| { tag: "ok", value: T }
| { tag: "error", error: E }
export namespace Result {
export function ok<T, E>(value: T): Result<T, E> { return { tag: "ok", value } }
export function error<T, E>(error: E): Result<T, E> { return { tag: "error", error } }
}